Screen pixelDepthProperty
Screen Object
Definition and Usage
The pixelDepth property returns the color resolution (bits per pixel) of the display screen.
Syntax
screen.pixelDepth
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer 10, Firefox, Opera, Chrome, and Safari browsers support the pixelDepth property.
Note:Internet Explorer 9 and earlier IE versions do not support the pixelDepth property.
Tip: colorDepthThe colorDepth property and the pixelDepth property do the same thing. Since all major browsers support colorDepth, that property is used. /p>
Example
Example
Return the color resolution of your screen:
<script>
document.write("Color depth: " + screen.pixelDepth);
</script>
document.write("Color depth: " + screen.pixelDepth);
</script>
The output of the above example is:
Try it yourself »
More Examples
This example contains all the screen properties.
Screen Object Other Extensions