Hexadecimal Colors - CSS Colors | CSS: Presentation Layer

Standards Based Development

The # declares that the color is hexadecimal, the other six digits (or three) are really three sets of pairs, 0-9, and a-f. Each pair controls one primary additive color. Hex numbers are strings full of patterns:

We can build on these patterns to find additive and subtractive colors:

Subtractive colors start with white; we can find subtractive primaries by changing each pair to 00:

No primaries means no color; All primaries means all color.

Shades

Treat hex colors with increments of ten; adding one to each of the left-hand character of each pair, the color's brightness is raised, while its saturation is lowered.

The Code Side of Color