TOC PREV NEXT INDEX

domref



window.screen.pixelDepth


Returns the bit depth of the screen.

Syntax

depth = window.screen.pixelDepth
 

Parameters

depth is the number of bits per pixel as an integer.

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";
 
}
 

Notes

See also window.screen.colorDepth.

Specification

DOM Level 0. Not part of specification.
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX