The goal

Replace individual colors in a multi-layer Photoshop document in a way that is flexible and efficient enough to be done a multiple times in the production process—like when I need to update the colors or edit layer content. I have a palette of 5-10 colors used in many different layers (all layers are multi-color raster images), and I want to be able to arbitrarily replace them, without having to do a lot of manual work each time.

Is it possible to do this with adjustment layers (or anything else)?

How I tried and failed to do this with Adjustment Layers

Idea #1: For each color you want to replace, add a Replace color adjustment layer, configured to replace the old color with the new color.

Problem: There is no Replace color adjustment layer (as of CS6).

Idea #2: For each color you want to replace, add a color-changing Adjustment Layer (such as Hue/Saturation) with a Color range mask selecting the old color (let's assume it's yellow).

Problem: As soon as you add/move/recolor anything yellow in the layers below, the mask will no longer be accurate. The mask does not dynamically select yellow—it just stays the same as it was when you set it up. (I don't know if it's even possible to make a dynamically updating mask that's tied to the content of lower layers, but I would love to hear how if it is.) So, if you want the mask to be updated, you have to manually update it. This tediousness is what I'm trying to avoid.

Is there a way to do this sort of color replacement, using adjustment layers, masks, or any other technique, like actions or scripts?

  • 2
    Well you could use illustrator and something that photoshop doesn't have: Global swatches. :) -- Similar question: graphicdesign.stackexchange.com/questions/13787/…
    – Joonas
    May 14, 2013 at 9:35
  • There IS replace color in CS6.
    – Scott
    May 14, 2013 at 11:46
  • @Scott Replace color exists on its own, but not as an Adjustment Layer.
    – supertrue
    May 14, 2013 at 13:52
  • 2
    You can also make several replacements with a single Hue/Saturation adjustment layer
    – Const
    May 14, 2013 at 14:21
  • 1
    I'm going to have to say.. stick to CS5 then. Your workflow seems to require it. I disagree about Illustrator, layer organizing in object-based applications isn't as imperative as it often is in raster based applications. And if you're dealing with flat color and keylines, AI will absolutely be faster for editing (provided you're proficient with it).
    – Scott
    May 14, 2013 at 14:56

3 Answers 3


Here's one way to achieve this:

  1. Use Select > Color Range (after this you can Save selection to keep this mask if you want)
  2. Create a new layer on top of all other layers with the color you want to replace, name the new layer something like 'color overlay - blue'
  3. Use Paint Bucket to fill the color selection in the new layer

Now you have a color overlay layer for the color you wanted to replace, Also, when you select this layer and then Select > All, you will have the same mask you had when you used Color Range at the beginning of the process (i.e. you can use this layer to quickly overlay any color you want)

  • To expand on your answer, I found this video tutorial helpful. The author shows how to use a Hue/Saturation Adjustment Layer to match another color exactly.
    – Mentalist
    Sep 26, 2017 at 6:46

This script will allow you to select various layers and change them all to one same colour at the same time, without dealing with masks or selections. It will work on any solid-colour layer with a mask or shape layers.

  • This seems to be what I need, but the script doesn't seem to exist. Can you maybe post the script in the post itself or perhaps update the link?
    – LPChip
    Jul 24, 2016 at 18:58
  • Internet Archive copy of the original website is here, but the original script download link was not archived.
    – Kirkman14
    Feb 21, 2023 at 16:51
  • I tracked down Konrad Kolasa, and got him to send me the JSX. I have uploaded it to the Internet Archive for posterity.
    – Kirkman14
    Feb 28, 2023 at 2:55

Selective Color is one thing you can try.

Another idea is to use a "Gradient Map". Both can be found under the adjustment layer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.