[solved] Transparency gradient based on color?

Post questions on how to use or achieve an effect in Inkscape.
schwa
Posts: 2
Joined: Mon Mar 11, 2019 3:38 pm

[solved] Transparency gradient based on color?

Postby schwa » Mon Mar 11, 2019 3:44 pm

Okay, here's what I'd like to do, and can't figure out how:

I've made an image, white with a black background (alternating white and black layers). The image is mostly white but parts of it fade between white and black so it's actually greyscale. I would like to make a copy of it to overlay on images in such a way that the white parts are solid white (full opacity), the black parts are completely transparent, and everything in between is the appropriate relative transparency. For example, the parts that are 50/50 would have 50% transparency.

Is this something I can do in Inkscape?

Lazur
Posts: 4715
Joined: Tue Jun 14, 2016 10:38 am

Re: Transparency gradient based on color?

Postby Lazur » Mon Mar 11, 2019 5:10 pm

Hi.

You can use filtering for that. Setting the layer to screen blending mode would be "close enough".

If not, try applying this filter on the objects grouped together:
lumi.svg
(4.3 KiB) Downloaded 141 times

User avatar
Xav
Posts: 1204
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Transparency gradient based on color?

Postby Xav » Mon Mar 11, 2019 5:40 pm

You could also use the existing image as a mask over a white background. Gather all the bits of your image together into one layer, and group them. Then draw a white rectangle that covers them all, and send it to the back. Finally, with both the white rectangle and your B&W grouped image selected, use Object > Mask > Set.

Turning on the checkerboard background in Document properties might help to confirm that the right bits are becoming transparent.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

schwa
Posts: 2
Joined: Mon Mar 11, 2019 3:38 pm

Re: Transparency gradient based on color?

Postby schwa » Tue Mar 12, 2019 3:40 am

Xav, that did exactly what I was hoping! I need to look into "Mask" more...

User avatar
Xav
Posts: 1204
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Transparency gradient based on color?

Postby Xav » Tue Mar 12, 2019 4:25 am

Blatant plug: Part 14 of my tutorial series covers masking.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 11 guests