Appendix B. WEB COLOR REFERENCE

This section of the reference guides provides an overview of how to write color values for the Web, as well as a full list of supported color names. See the "Color theory" section in Chapter 4 for a discussion of color theory.

Color values

On the Web, colors are displayed by mixing red, green, and blue (RGB) light. Values range from 0 to 255 and can be written as such (e.g., rgb(5,233,70)), but they are more commonly written in hexadecimal. Colors written in hex consist of a hash sign (#) followed by six digits. The six digits are made up of pairs, representing the red, green, and blue color values, respectively.

  • #XXxxxx: Red color value

  • #xxXXxx: Green color value

  • #xxxxXX: Blue color value

Hexadecimal notation is a numbering ...

Get The Essential Guide to CSS and HTML Web Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.