Magically Inverting Text in Photoshop

Today’s Photoshop tutorial covers a scenario that, for reasons beyond my comprehension, I encounter often. That is, how to make text that inverts against its background. Or how to make text that inverts its background. The semantics are different, the effect is the same.

Or, as Deke once put it, “You make text that inverts unambiguously. Where the image is white, the text is black; where the image is black, the text is white. And where the image is gray, or near gray, the text provides as much contrast as possible.”

And when you’ve created this text, you can actually move it anywhere in your image and get the same effect, with the text adjusting to its surroundings like a gorgeous black-or-white chameleon that can assess shades of gray and make a call which way to go.

There’s a relatively simple set of steps to follow to create this delightfully accommodating text:

1) Set your text to white.

In the example that I used for illustration, Deke had already turned the text to outlines (so that anyone could use the file without worrying about his text choice). So in this case, you’d select the “text” layer (it’s really a standard layer called “text”), set the colors to their defaults (by pressing the D key), and then pressing Command-Shift-Delete (Ctrl-Shift-Backspace).

As Deke deftly explained it once, Command-Delete (Ctrl-Backspace) fills the pixels with the background color, and adding the Shift key respects the transparency of the layer. Of course, if you have a legitimate text layer, you can just change your text color to white directly from the options bar. Regardless, here’s the current status of our project:

2) Set the blend mode to Difference.

In the Layers panel, open the popup menu and change the blend mode to Difference (as I’ve done below.) You can see immediately that Photoshop is calculating the opposite color against each background; so the text that is covering the model’s dark orange skintone is turning its opposite: light blue. Setting this blend mode is the key to making this text adapt to its surroundings on-the-fly. 

3) Desaturate the text layer.

Alt-click (Option-click) the black/white icon at the bottom of the Layers panel and choose Vibrance from the popup menu. Pressing the Alt (Option) key allows you to name your new layer, which in this case could suitably be called “desat.” Then set the Saturation to -1 in the Properties panel (or in the Adjustments panel in earlier versions of Photoshop, or in the dialog box in even earlier versions of Photoshop.) You won’t notice any change right away, until you…

4) Turn off the Blend Clipped Layers to Group checkbox in the Layers Style dialog box.

Double-click in any open area of the Text layer to open the Layer Style dialog box, and un-check the Blend Clipped Layers as Group box (which is on by default). With this setting off, Photoshop will Desaturate after applying the Difference blend mode, meaning it will desaturate the “blue” effect of the text, which is what we want.

5) Apply a Levels adjustment layer to turn the grays to white.

Option-click (Alt-click) the black/white icon at the bottom of the Layers panel and choose Levels. Name your new layer “contrast.” In the Properties panel, set the value on the far left (the highlights, basically) to 120 as shown below. This tells Photoshop that for any value above 120, you want the text to render as white.

Voila, the text now shifts from white to black and back, depending on what is underneath.

6) Prove it works by moving the text around.

The beauty of setting up the text this way, rather than say making a mask that might manually (but temporarily) supply the same effect, is that if some tedious person decides you should move the text to the top of the image, your patience isn’t further tried by having to readjust the text. Wherever you move the text, it will invert dynamically depending on what’s behind it. Bravo, Monsieur McClellando.

Next entry:ADIM (Awesome Russell Brown Design Masterclass) Returns from the Dead: Deke and Zombies to Appear

Previous entry:Deke’s Techniques 205: Creating an Antique Photo Effect


  • Nice

    I’d seen this before in your one-on-one series but forgot how to do it. I always forget those Advanced Blending option check boxes. They are so mysterious and powerful.

  • This is one of Deke’s finest

    This is one of Deke’s finest moments! Thanks for reminding me…

  • I’m a bit confused on this.

    Can someone tell me what course does Deke teach you this technique?


Share your feedback, work, homages, questions, wisecracks, advice, critiques, riffs, derision (within reason), frustrations, and love of all things graphical. Log in (or register) to lend your voice.