Mobile app version of vmapp.org
Login or Join
Si6392903

: Replace single color How do I replace a single Color in photoshop!? All, and I really mean all, sites I find with Google either use the replace color tool box (which just replaces hue), the

@Si6392903

Posted in: #AdobePhotoshop #Color #HowTo

How do I replace a single Color in photoshop!?

All, and I really mean all, sites I find with Google either use the replace color tool box (which just replaces hue), the replace color tool (which just replaces hue and saturation), or use color adjustment layers, colorize, gradient layers, select color range, etc which all modify a (fussy) range of colors and can't be applied on a specific part of an image without going through extra trouble (layers).

I just want to quickly replace a single color, (eg. red 255,0,0,0) with another color (eg. Green 0,255,0), and do this often because I work with pixel art most of the time.

To illustrate it with Paint Shop Pro, this is what I want:

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Si6392903

3 Comments

Sorted by latest first Latest Oldest Best

 

@Sims5801359

Not sure if I've missed something, but can't you just:


define the area in which colour is to be replaced with the selection tool
Pick the new colour
switch to Fill tool, and set Tolerance to 0, Contiguous off
click on a pixel of the relevant colour (you can check the colour of the pixel under the cursor with the Info palette)

10% popularity Vote Up Vote Down


 

@Tiffany317

A faster way to tackle this is:


Be sure that your Eyedropper Tool sample size is set to "Point Sample" and that you have unchecked "Contiguous" and "Anti-Alias". If your color is exact (no slight variations) then also set tolerance to 0. (Save this as a tool preset so it's easy to get to in the future.)
Use the Magic Wand tool to click one pixel of the target color. All the pixels of that color will now be 100% selected.
Set the Marquee (or Lasso, if you need an arbitrary selection area) tool to "Intersect With Selection" (the rightmost icon in the set), and select around the area you want to affect. This will deselect everything else in the image and leave only your target area selected.
Fill the selection with the new color.


The important difference between the Magic Wand tool and Select > Color Range is that Magic Wand is an all or nothing tool: a pixel is either 100% selected or 0% selected. Color Range selects gradiently, depending on the degree of match, channel by channel, between the target color and actual pixel.

Most of the time, Color Range is a far better selection tool than the Wand, but this is a case where the more primitive tool actually gets the job done faster and more accurately.

10% popularity Vote Up Vote Down


 

@Deb5748823

As far as I know, Photoshop is kinda lacking a straightforward tool for color replacement. All I can really offer is a third method, which might be a touch more accurate, involving selecting a color range. And some keyboard shortcuts, in case you've missed one or two. :-)

To go along with your picture example:


Sample the color you want to select. Shortcuts: I for eyedropper, or Alt-click with pen/brush.
Use Marquee tool to select the area to adjust. Shortcut: M
Go to menu Select -> Color range. Unselect Localized Color Clusters. Fuzziness set to 0 should work for exact color selection. No shortcut for this, but you can set it up if it helps. It should remember the settings too, so it'll be a bit faster the next time.
Go to Color picker, and choose your new color.
Fill the selected area with the new color. You could use menu Edit -> Fill (Shift-F5), but I'd just press Alt-Backspace. If you have your new color set up as background color, then try Ctrl-Backspace instead. And if there's still some of that sneaky transparency around, repeat this a couple of times.
Clear selection with Ctrl-D.


Using background/foreground colors you can save a little bit time by doing both in advance.
It might be possible to construct an Action from this, but I haven't played with Actions enough to get it working. It seems to remember the selected color while it was recorded. :-)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme