Photoshop Pseudo Color Variables

Jul 09, 2012

I can’t possibly be the only person who has wished Photoshop supported something like color variables. Sadly, it doesn’t. However, for those that aren’t terribly OCD about the organization of their layers, there’s a sort of ghetto work around: Photoshop CS6’s layer clipping masks.

The situation

Take for example this UI. There are a few elements in this comp that I’d like to have appear with a highlight color. My client tends to like to change things. I know that he’ll probably change the color of that highlight, but I’ve convinced him that the highlight color should stay consistent throughout the design.

In a variable-less world, both of the blue shapes as well as the blue text are separate layers and all have separate instances of the same blue color. If the client asks to change that blue to magenta, I’ll have to update all 3 layers. That’s silly.

Enter the pseudo variable

Since we can’t get all of the layers pulling from the same color, let’s get one color pulling it’s shape from all the layers. The trick? Layer clipping masks.

In CS6, Adobe has given us the ability to do the same tricks with layer groups that we’ve been using on layers. All we need to do is use all of our desired layers in a group as a clipping mask for a color fill layer.

  1. Get all of your layers into a group and call it something like “mask”.

  2. Create a new vector fill layer above your group and make it your desired color.

  3. With your color layer selected, from the Layer menu, choose Create Clipping Mask.

  4. Group your mask group and your color layer into a new group and give it a good name. Nerd points if you give it a variable sounding name. I’m going to go with “$hightlight.”

  5. Celebrate. Now you can change your color variable by just changing your color fill layer.

That’s pretty much it. Of course, it’s not a perfect method. It isn’t a true color variable. It really messes with the orders of your layers. However, if you happen to not be OCD and you really like a quick, easily editable workflow, then this trick will probably save your life.