Mobile app version of vmapp.org
Login or Join
Ravi4787994

: Turning pixel brightness into transparency in single-hue image 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

@Ravi4787994

Posted in: #AdobePhotoshop #Background #Transparency

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!

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi4787994

3 Comments

Sorted by latest first Latest Oldest Best

 

@Tiffany317

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.


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.

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.

10% popularity Vote Up Vote Down


 

@Ogunnowo857

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.

10% popularity Vote Up Vote Down


 

@Debbie163

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme