TOC PREV NEXT INDEX

Put your logo here!


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. 


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX