Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the image below with the red lightning effect a single layer. What I'd like to do is make the red transparent, but maintain pixel brightness, so that I can then overlay it on a red canvas, or blue canvas, etc etc. How can I keep the pixel brightness in this way? Currently, with it all transparent, it looks like this:

Baseline Image

share|improve this question
up vote 4 down vote accepted

What you should do is turn the red lightning effect into a layer mask.

  1. Create a new layer, fill it with black
  2. Add a layer mask to this new layer by either clicking the Add layer mask button on the Layers pane or using Layer > Layer Mask > Reveal All
  3. Copy your (flattened) lightning artwork to the clipboard
  4. Open up the layer mask editor by Alt + Clicking the "Layer mask thumbnail" on the Layers pane. (It's the white box next to right of the "chain").
  5. Paste in your copied lightning artwork. It will turn grayscale, and that's okay.
  6. Invert the lightning artwork with Ctrl | Cmd + I
  7. Exit the layer mask editor by clicking another layer on the Layers pane

Following those steps should give you the following result:

Photoshop screenshot

It's not perfect because your black background in the original image was not #000000. We can correct this by adjusting the levels (Ctrl | Cmd + L) of the layer mask and setting the white point to the background (the white eyedropper icon).

Doing so gives me the final image below that you can use to overlay on any color:

final image

Overlaying this on blue would look like this (ignore the text since I don't have the separated layer available):

final image on blue

JSFiddle demo (with bonus animation in Chrome)

share|improve this answer
Thanks for the detail :) – Ben Feb 11 '14 at 22:07
Nice bonus animation! ;) If you added another 'to {}' would it smoothly transition back to red after blue? It jumps atm and jsfiddle doesn't work well for editing on mobile. – Dom Feb 12 '14 at 12:56
@Dom improved the animation for you; you can set animation-direction: alternate to transition it back – JohnB Feb 12 '14 at 21:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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