3.13 Color Properties
In Figure 3.13, you can see two color properties—color and background-color. The color property specifies the color of an element’s text. The background-color property specifies the background color of an element. The color properties are pretty straightforward, right? It’s the values for the color properties that require more attention.
There’s quite a bit of flexibility when it comes to specifying color values. You can specify a color value using one of five different formats. We’ll describe the formats in detail, but first, here’s a teaser of what you can look forward to:
color name—for example, red
RGB value—specifies amounts of red, green, and blue
RGBA value—specifies red, green, and blue, plus amount of opacity ...
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