javascript screen pixelDepth

pixelDepthNN 4 IE n/a DOM n/a  

Read-only  

Returns the number of bits per pixel used to display color in the video monitor. This value is similar to the colorDepth property, but it is not influenced by a potential custom color palette, as colorDepth is.

 
Example
 
if (screen.pixelDepth > 8) {
    document.getElementById("pretty").color = "cornflowerblue";
} else {
    document.getElementById("pretty").color = "blue";
}
 
Value

Integer.

 
Default

Current video control panel setting.


1696,Nickname,Homepage or email,Comments here,Add comment