Get the color resolution of your screen:
The result of x will be:
More "Try it Yourself" examples below.
The pixelDepth property returns the color resolution (in bits per pixel) of the visitor's screen.
Tip: The pixelDepth property is not supported in Internet Explorer 9 and earlier versions. However, the colorDepth property represents the same thing as the pixelDepth property. Since all major browsers support colorDepth, use that property instead.
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
pixelDepth | Yes | 10 | Yes | Yes | Yes |
Return Value: | A Number, representing the color resolution, in bits per pixel. Possible values:
|
---|
All screen properties in one example: