3

I'm looking for a way to take single-hue images and turn their brightness into opacity in Photoshop.

At the simplest, say you have a flat green circle on a white background (as an already saved file). I want to turn the aliased edges where the pixels are a lighter green into pixels of the same value as the center of the circle, but more transparent.

Theoretically, I could then put this image on any color background and it would look aliased. No little borders that are so indicative of the image originally having a different background color.

This seems like a super-basic thing to do, and I'm maybe I'm just not describing it with the right words, but I can't find it ANYWHERE.

Thanks!

2

The short answer is you can't. It doesn't work that way, because the anti-aliasing pixels are already a mix of your flat color and white. Even a fuzzy selection tool like Select > Color Range will create a partial selection of the already-modified colors.

You have two basic ways to accomplish the end product you're going for. Either works for any solid color shape against any kind of background.

  1. Create an anti-aliased selection that excludes the original anti-aliasing (There are many ways to do this. This is only one of them.):

    • Eyedropper your color so it's the active foreground color.

    • Select > Color Range and click to select all of your colored shape.

    • Use Refine Edge to reduce the selection to within the area that is your solid color.

    • Adjust the Smooth and Radius sliders to provide the amount of anti-aliasing you need.

    • Click the new layer mask icon at the bottom of the Layers Panel to mask off the rest of the layer.

  2. If you really want to retain the original size, including the anti-aliasing pixels, you have to first make all the non-white pixels full color then restore anti-aliasing:

    • Use Image > Calculations to multiply the highest-contrast channel against itself to create a new channel.

    • Use a Levels adjustment on that channel to turn all the grey pixels black. (Drag the left, blacks, slider all the way to the right.)

    • Invert the channel.

    • Ctl/Cmd-click the channel thumbnail to load as a selection.

    • Revert to full RGB or CMYK mode, create a new layer, and fill the selection with your flat color and turn off the original layer.

    • Use Filter > Blur > Gaussian Blur to apply a slight (1 to 1.5 pixel) blur.

1

I think the best way to do this is to use one of the channels as a selection.

If you have a purely green circle on a white BG, make the red or blue channel from the channel window your selection (ctrl+click), inverse the selection and fill it with the color of the shape. The aliased edges should work as varying levels of transparency for whatever color you filled the selection with in this case.

EDIT: This isn't a perfect or super-convenient fix, but to deal with ones that aren't 0 in any channels, select the channel that has the darkest circle and fill the selection with the color you want. It will be semi-transparent. Then contract that same selection by 1-2 pixels and fill a new layer with the same color. Duplicate the contracted layer again and again until it's close or exact.

If you duplicate the layer without contracting it, you will duplicate the anti-aliasing and have hard edges. This fixes that.

  • That's awesome! Too bad it only works for colors that have 00 as the value for one of the RGB channels. Thanks for your help :) – Erik Kennedy Jun 13 '14 at 23:38
  • To have a full opaque background. you can convert the image to gray by Ctrl+Shift+U( Desaturate ) and then use "Levels" to translate darkest gray to black. Then use the good method above. – AMIB Jan 31 '15 at 11:14
0

If you export the shape as a PNG over a transparent background. The anti-aliased edges of the shape will be slightly transparent and will take on the hue of whatever background you put it on.

  • Sure! But what if you only have the image of the circle on white? Thanks :) – Erik Kennedy Jun 13 '14 at 21:39
  • Depending on the colours of the image (i.e. bright green won't work) you can set the blend mode to Multiply. Other than that I haven't been able to come up with anything. – Adam Thompson Jun 13 '14 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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