What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How to change color of rasterized text?


onthebeach

Member
Messages
5
Likes
1
I have white text on a yellow background...I need to change the background to white and the text to green. The rasterized text is part of the yellow background (ie it's not a seperate layer). Any attempt to change the colour or select the text invariably doesn't catch all the aliased pixels....with my resulting text not looking as smooth as the original.

Any one a good technique for solving this??

Thanks!
 
Create two layers of your image, top layer image adjust replace colour to change background then on the other layer do the same but use the subtract option from the layers panel.

Post your image and i will convert it to show you, as my example could have been made the one way and then i tell you i did it this way get what i mean buddy.
 
colour-change.jpg using your colours i converted to this using above method.
 
Thanks Paul, not much joy with the above...ended up with a white layer with a faint yellow edge where the text is. The subtract layer I ended up with a black layer...obviously doing something wrong!

Here's the original:

Green-Hills.png

Here's what I need (this is one I did...but not smooth edges)

green.png

This logo will be 1metre wide on a flag....perhaps given the printing and that it will be viewed from a distance I'm being a little bit fussy!!
 
If you case in order to select the text just load Blue channel as a selection.

In general case you can use Filter Factory plugin to remove the background.

Say your text color is (r1, g1, b1) and the background color is (r2, g2, b2). Then in Filter Factory dialog
Just set r1, g1, b1 for r, g, b channels and 255*(r2 -r)/(r2 - r1) for opacity.(if r1 = r2, then use 255*(g2 -g)/(g2 - g1). If g1 = g2, then use 255*(b2 -b)/(b2 - b1).

Example:
Say your text color is (12, 78, 200) and background color is (123, 34, 90). Then in Filter Factory dialog
Just set 12, 78, 200 for r, g, b channels and 255*(123-r)/(123-12) for opacity.

In your case text color is (255,255,255) and background is (255,255,0) so opacity will be
255*(0 - b)/(0-255) = b. That is, the blue channel will give you the selection of the text.
 
Here's what I got with FF:

rtd.png

Just set in FF dialog
r: 80
g: 120
b: 94
a: 255*(56-b)/(56-255)

and got separate layer with green text. Put it over white layer.
 
Yet another way for all interested:

As of Photoshop CS5, there are 2 new blend modes: Subtract and Divide. So there is a way to solve this task using just these modes.

1. Find the channel with the most contrast, in your case it's Blue channel with 57 value for background and 255 - for white text.
2. Create new layer.
3. Use Appy image with the Source layer Merged and Blue channel and Normal mode to fill this layer with the Blue channel.

Now we are going to apply the formula (x - 57)/(255 - 57) to this layer, where x is the Blue channel value.

4. Create new layer, fill it with 57 Gray.
5. Go to our Blue channel layer and use Appy image with the Source layer from step 4 and Subtract mode.
6. Create new layer, fill it with 255 - 57 = 198 Gray.
7. Go to our Blue channel layer and use Appy image with the Source layer from step 6 and Divide mode.

Here we are: our Blue channel layer now can be used as the mask to separate the text from the background. Load it as a selection(Ctrl-Alt-2) and create Solid color fill layer. Drop some background layer behind it.
 
Why not use selective color to change the white to green, then use hue/saturation to change the yellow to white?
2.jpg
This way you don't have to depend upon a selection method to get perfect results. The smoothness that was there, still is there.
If you need more control after you get here you can merge to a new layer then dial in the the color you want with hue/saturation.
 

Back
Top