DOM:window.screen.pixelDepth
From MDC
Contents |
[edit] Summary
Returns the bit depth of the screen.
[edit] Syntax
depth = window.screen.pixelDepth
[edit] Example
// if there is not adequate bit depth
// choose a simpler color
if ( window.screen.pixelDepth > 8 ) {
document.style.color = "#FAEBD7";
} else {
document.style.color = "#FFFFFF";
}
[edit] Notes
See also window.screen.colorDepth.
[edit] Specification
DOM Level 0. Not part of specification.