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 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.
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 Rangeand click to select all of your colored shape.
Refine Edgeto reduce the selection to within the area that is your solid color.
Radiussliders 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:
Image > Calculationsto multiply the highest-contrast channel against itself to create a new channel.
Levelsadjustment 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.
Filter > Blur > Gaussian Blurto apply a slight (1 to 1.5 pixel) blur.