TOC PREV NEXT INDEX

Put your logo here!


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. 


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