Most of us take color for granted. For web professionals, it’s a big heap of details. Experienced developers need to know how to relate color data to their literal counterparts, and the body of related knowledge gets trickier and more subjective from there. Web color is about the numbers and the art, and it never hurts to understand the two together.
Backgrounds offer challenges of their own. Assigning a flat background color to an element is a straightforward task, but once images enter the picture the implementation questions start to multiply.
This book doesn’t cover web color and graphics in depth, but there are plenty of good resources out there. A number of sites are linked from this book’s companion site. I also recommend the following books:
Web Style Guide, Third Edition, by Sarah Horton and Patrick Lynch (Yale University Press)
Painting the Web by Shelley Powers (O’Reilly)
The CSS 2.1 properties that can take color values are the various background and
border properties. There’s also the
color property, which
sets the text and underline colors of the elements to which it is
When assigning colors and background colors to two elements, adhere to the following:
used in a stylesheet rule,
color should follow—and a background color
reference should always precede a
color value. This prevents odd user agent or user stylesheet defaults ...