TOC PREV NEXT INDEX

domref



window.screen.colorDepth


Returns the color depth of the screen.

Syntax

bitDepth = window.screen.colorDepth
 

Parameters

bitDepth is an integer representing the color depth in bits.

Example

// check the color depth of the screen
 
if ( window.screen.colorDepth < 8) {
 
    // use low-color version of page
 
} else { 
 
    // use regular, colorful page
 
}
 

 

Notes

See also window.screen.pixelDepth.

Specification

DOM Level 0. Not part of specification.
 


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