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 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: enter image description here

9/9/2012 3:36:00 AM

Accepted Answer

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)
9/10/2012 4:12:00 PM

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.