Chapter 13: Color
In view of the color detection capability, you might consider setting screen colors based upon user screen conditions. A style sheet reference based upon the color support could be written:
bitDepth = window.screen.colorDepth;
bitDepth = 8;
if (bitDepth > 8)
document.write('<link rel="stylesheet" href="hicolor.css" media="screen" />');
document.write('<link rel="stylesheet" href="locolor.css" media="screen" />');
<link rel="stylesheet" href="locolor.css"
Overview | Chapters | Examples | Resources | Buy the Book!