Easy Tutorial
❮ Prop Search Readonly Met Form Reset ❯

Screen pixelDepth Property


Definition and Usage

The pixelDepth property returns the color resolution of the display screen (bits per pixel).

Syntax


Browser Support

Internet Explorer 10, Firefox, Opera, Chrome, and Safari support the pixelDepth property.

Note: Internet Explorer 9 and earlier versions do not support the pixelDepth property.

Tip: The colorDepth property does the same thing as the pixelDepth property. Since all major browsers support colorDepth, it is recommended to use this property.


Example

Return the color resolution of your screen:

<script>
document.write("Color Resolution: " + screen.pixelDepth);
</script>

The above example outputs:

document.write("Color Resolution: " + screen.pixelDepth);

More Examples

This example includes all screen properties.


❮ Prop Search Readonly Met Form Reset ❯