SetAlphaChannel
SetAlphaChannel[color]
adds full opacity to color.
SetAlphaChannel[color,a]
adds opacity a to color.
SetAlphaChannel[image,…]
sets the alpha channel of image to a.
Details

- SetAlphaChannel returns an image with an alpha channel using either fixed opacity for all pixels or an image containing the opacity for every pixel. Alpha channels are typically used for highlighting regions of interest or masking the image.
- SetAlphaChannel[image] is equivalent to SetAlphaChannel[image,1].
- In SetAlphaChannel[image,a], a can be a scalar value or an image with the same dimensions as image.
- When setting opacity to a color or image, existing opacity properties are ignored.
- SetAlphaChannel works with any valid color directive as well as 2D and 3D images of explicit color space—that is, any setting of the ColorSpace option other than Automatic.

Examples
open allclose allScope (7)
Applications (4)
Segment the background to be used as an alpha channel:
Set the alpha channel to a detected background:
Use an alpha channel to mask regions of an image:
Use an alpha channel to highlight a region of interest:
Find individual cells that do not touch the border and have only one hole:
Highlight the detected foreground while keeping the background half transparent:
Set the alpha channel of an RGB image to be the negative of its blue channel:
Text
Wolfram Research (2010), SetAlphaChannel, Wolfram Language function, https://reference.wolfram.com/language/ref/SetAlphaChannel.html (updated 13).
CMS
Wolfram Language. 2010. "SetAlphaChannel." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 13. https://reference.wolfram.com/language/ref/SetAlphaChannel.html.
APA
Wolfram Language. (2010). SetAlphaChannel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetAlphaChannel.html