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:
00is a lack of primaryffis primary at full strength.#000is black, no primaries#fffis white, all primaries.
We can build on these patterns to find additive and subtractive colors:
#000is black, starting point#f00is the brightest red#0f0is the brightest green#00fis the brightest blue
Subtractive colors start with white; we can find subtractive primaries by changing each pair to 00:
#fffis white, starting point#0ffis the brightest cyan#f0fis the brightest magenta#ff0is the brightest yellow
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.