RemoveAlphaChannel

RemoveAlphaChannel[color]

removes opacity from color.

RemoveAlphaChannel[color,bg]

removes opacity by blending color with the background color bg.

RemoveAlphaChannel[image,]

removes opacity from all pixels in image.

Details

  • RemoveAlphaChannel returns an image or a color without an opacity value or alpha channel, either dropping or blending the colors with a specified background color.
  • RemoveAlphaChannel returns the original color or image if it does not contain an alpha channel.
  • When blending with a background color, an RGB or grayscale color or image is always returned.
  • RemoveAlphaChannel works with any valid color directive as well as 2D and 3D images.

Examples

open allclose all

Basic Examples  (3)

Remove opacity from a color directive:

Drop the alpha channel from an image:

Remove opacity by blending with a white background:

Scope  (5)

Remove opacity from a color directive:

Remove an opaque mask from a grayscale image:

Remove opacity by blending with a pink background:

Remove the alpha channel from a 3D image:

Blend with a black background:

Applications  (2)

Replace all transparent colors with fully opaque colors in graphics:

Create artistic effects using alpha blending:

Properties & Relations  (2)

On an image with no alpha channel, the input image is returned:

Remove the alpha channel using ColorSeparate followed by ColorCombine:

Wolfram Research (2010), RemoveAlphaChannel, Wolfram Language function, https://reference.wolfram.com/language/ref/RemoveAlphaChannel.html (updated 13).

Text

Wolfram Research (2010), RemoveAlphaChannel, Wolfram Language function, https://reference.wolfram.com/language/ref/RemoveAlphaChannel.html (updated 13).

CMS

Wolfram Language. 2010. "RemoveAlphaChannel." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 13. https://reference.wolfram.com/language/ref/RemoveAlphaChannel.html.

APA

Wolfram Language. (2010). RemoveAlphaChannel. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RemoveAlphaChannel.html

BibTeX

@misc{reference.wolfram_2021_removealphachannel, author="Wolfram Research", title="{RemoveAlphaChannel}", year="13", howpublished="\url{https://reference.wolfram.com/language/ref/RemoveAlphaChannel.html}", note=[Accessed: 23-May-2022 ]}

BibLaTeX

@online{reference.wolfram_2021_removealphachannel, organization={Wolfram Research}, title={RemoveAlphaChannel}, year={13}, url={https://reference.wolfram.com/language/ref/RemoveAlphaChannel.html}, note=[Accessed: 23-May-2022 ]}