Text over image // Alternating colors

Post questions on how to use or achieve an effect in Inkscape.
nether00
Posts: 3
Joined: Mon Jun 22, 2015 5:04 am

Text over image // Alternating colors

Postby nether00 » Tue Jun 23, 2015 3:05 am

Hi all,

I've been an InkScape user for years but have never tried to do what I am doing now. Forgive me if this has been addressed before; if that is the case, please link me to the appropriate thread.

Currently working on a Black and White show card design with several layers.

The top layer is text, which is laid over a hard-edge geometric image.

Where the text is above white, the text should be black; where it is above black, it should be white.

Easy enough. However, as you will see in my sample below, there are many instances where a single character is split. In those cases, I would like the character to be part black and part white.

Is there a way to do this?

Here is an image for reference. Note that the typos are intentional (I did not want to post the original with artists' names intact):
Image

Thanks in advance.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Text over image // Alternating colors

Postby brynn » Tue Jun 23, 2015 4:38 am

I think I'd probably use Clipping for that -- it would be much faster than the alternative, which is node editing. Let's see....

There would be 2 versions of the text (a black and a white). And the black geometric shape....you might need 2 whole sets of that too. Hhmm, I'm not positive about that.....well yes, 2. 1 is the black shape that you will see, and the duplicate will be the clipping path.

Do you need more details? Since you didn't say how you usually use Inkscape, I'm not sure if you already know how to use Clipping or not. Let us know if you need more details. Or maybe someone else will have time to write up more details. If you need, I can do it, just not at this moment.

nether00
Posts: 3
Joined: Mon Jun 22, 2015 5:04 am

Re: Text over image // Alternating colors

Postby nether00 » Tue Jun 23, 2015 4:52 am

Thanks Brynn.

No, I do not know how to use Clipping. More details would be great (or a link to a tutorial) if someone has the time to go through it step-by-step.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Text over image // Alternating colors

Postby brynn » Tue Jun 23, 2015 5:48 am

1 -- Place the geometric black object under the text
2 -- Duplicate the text
3 -- Change color to white
4 -- Duplicate the geometric black shape
5 -- Change that to any color except black or white (doesn't matter what color, because it's going to disappear, but having it different will make it easier to select)
6 -- Make sure that colored shape is on top of everything else
7 -- Select the colored shape and the white text (hold Shift key for multiple selection)
8 -- Object menu > Clip > Set

That should do it!

Here's the manual info on Clipping, in case you need details: http://tavmjong.free.fr/INKSCAPE/MANUAL ... pping.html

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

Re: Text over image // Alternating colors

Postby Lazur » Tue Jun 23, 2015 6:00 am

If it's for black&white, you can involve cloning easily too.

Select the text and the shape below, set fill undefined in the fill and stroke tab
clone the text (Alt+D), set a white fill to it;
clone the shape, and use it to clip the clone of the text.

Basically this would make it possible editing the parent text and the shape, while keeping the visual effect.

Only thing to keep an eye on is the z-order of the objects -you need to move the clipping object to the text's layer and move it on top (Shift+PgUp and Home if necessary).

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

Re: Text over image // Alternating colors

Postby Xav » Tue Jun 23, 2015 7:36 am

Another approach is to use a filter on the text, with the "background alpha" option enabled (most easily done by temporarily setting the blend mode on a layer to something other than the default):

invert_text.svg
(4.91 KiB) Downloaded 203 times


There may be a better way to build the filter, but this was the simplest I could come up with.

1) Make the original text white.
2) Use a colour matrix filter to invert it to black.
3) Use a composite filter to limit the black part to the areas outside the black background.
4) Use a merge filter to display the white original, with the black filtered text on top.

The result is the white original text showing over the black background, and the black filtered text showing elsewhere. The advantage is that it's only one text object to deal with, and no need to change clipping paths if you alter the background.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

nether00
Posts: 3
Joined: Mon Jun 22, 2015 5:04 am

Re: Text over image // Alternating colors

Postby nether00 » Tue Jun 23, 2015 2:16 pm

Got it!

Brynn and Lazer URH -- after reading your posts, I was able to get it to work with clipping. But since some of the black areas in the background are fills and others are strokes, it took a lot of masks/ clones.

Xav, thanks for sharing your filter. That does the job perfectly. And it allows me to move and edit the text. Problem solved.

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

Re: Text over image // Alternating colors

Postby Xav » Tue Jun 23, 2015 6:53 pm

Here's an updated version, with a couple of options:

1) The first uses a flood filter primitive, so you can set the "inverse" colour to be anything you want, not just white.
2) The second uses a colour matrix to invert the main text colour - so black becomes white as before, but you can also use it with coloured text. You can tweak the matrix to modify the colour conversion, if necessary.

These versions also add a dummy merge primitive, to work around an issue with 0.91 (as found here: https://bugs.launchpad.net/inkscape/+bug/1438926).

invert_text.svg
(7.48 KiB) Downloaded 276 times
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Help with using Inkscape”