Make a shape invert the colors behind it

Post questions on how to use or achieve an effect in Inkscape.
grahamj42
Posts: 2
Joined: Sun Aug 03, 2014 1:43 pm

Make a shape invert the colors behind it

Postby grahamj42 » Sun Aug 03, 2014 1:53 pm

I am trying to make a vector image like this one which I made in a raster graphics program:

Image

As you can see, I am trying to make a shape which will invert the colors of some text and background behind it - white should become black and vice versa. However, I can't figure out a way to do this; Filters -> Color -> Invert just inverts the colors of the entire object which is not what I need. I have tried using the filter editor, combining the Merge and Color Matrix filters, but it either just inverts the color of the triangle or turns it transparent depending on the connectors.

How can I make the image above?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Make a shape invert the colors behind it

Postby druban » Sun Aug 03, 2014 4:53 pm

Lots of people here with amazing filter chops (cough -Xav) and I'm sure they can do this with a difference compositing filter. But it's quite easy the old fashioned way, and with a little extra effort it's even editable...

Four objects layered from BOTTOM TO TOP so:
1.Text (converted to paths, ungrouped and combined into one path in this example only to make sure the greek is not lost on other systems. Unconverted text works exactly the same way. The fill of the original must be unset to be able to change the clone's color after creating the clone),
2. A shape,
3. A Clone of the text,
4. A Clone of the shape( the order of the two clones switches depending on whether you have in your preferences set it to mask from the top or the bottom).

Make the fill of the text clone white. Select both it and the shape clone on top and from the object menu pick mask/set. The whole thing shouldn't take more than a couple of minutes.
Now the fun part - you can edit (node tool) either the shape or the text and their clones will update making it look like the black triangle actually is inverting the text! You can even select the original text if you haven't converted it and with the text tool type in a completely different text in its place. If you are simple minded like myself you can have hours of fun dragging the points of the triangle around and giggling and typing in funny words. Okay, maybe a minute. Still, fun is fnu.

molon_labe.png
molon_labe.png (9.48 KiB) Viewed 4747 times


TRUST.png
TRUST.png (11.58 KiB) Viewed 4744 times
Attachments
molon_labe.svg
(14.14 KiB) Downloaded 213 times
Your mind is what you think it is.

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

Re: Make a shape invert the colors behind it

Postby Lazur » Mon Aug 04, 2014 1:39 am


grahamj42
Posts: 2
Joined: Sun Aug 03, 2014 1:43 pm

Re: Make a shape invert the colors behind it

Postby grahamj42 » Mon Aug 04, 2014 2:12 am

druban wrote:...


That's exactly what I wanted to accomplish, that's a great detailed explanation, I think I can do it now. I really appreciate your time, thanks again!


Return to “Help with using Inkscape”