3.15 Opacity Values for Color
In the previous section, you learned how to produce a color by using the rgb construct with values for red, green, and blue. In this section, you’ll learn how to produce a partially transparent color by using the rgba construct with values for red, green, blue, and opacity. The fourth value, opacity, determines how opaque the color is, where opaque refers to the inability to see through something. It’s the opposite of transparency. If the opacity value is 100%, that means the color is completely opaque, and if there is content behind the color, that content gets covered up. At the other extreme, if the opacity value is 0%, that means the color is completely transparent.
The A in RGBA stands for alpha. Why alpha? ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access