Alpha (alpha channel)
For example, the color #8921F2
(also described as rgb(137 33 242)
or hsl(270 89% 54)
) is a nice shade of purple. Below you see a small box of that color in the top-left corner and a box of the same
color but with an alpha channel set at 50% (or 0.5) opacity, #8921F280
, where 80
is the hexadecimal equivalent of 50%. This color is also described as rgb(137 33 242 / 50%)
or hsl(270 89% 54 / 50%)
. The two boxes are drawn on top of a paragraph of text.
As you can see, the color without an alpha channel completely blocks the background text, while the box with the alpha channel leaves it visible through the purple background color.
See also
- CSS colors
- CSS values and units introduction
- Image file type and format guide
- Alpha compositing on Wikipedia
- RGBA color model on Wikipedia
- Channel (digital image) on Wikipedia