X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Screen pixelDepth Property

Screen Object Reference Screen Object

Example

Return the color resolution of your screen:

var x = "Color Resolution: " + screen.pixelDepth;

The result of x will be:


Try it yourself »


Definition and Usage

The pixelDepth property returns the color resolution (in bits per pixel) of the visitor's screen.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The pixelDepth property is supported in Internet Explorer 10, Firefox, Opera, Chrome, and Safari.

Note: The pixelDepth property is not supported in Internet Explorer 9 and earlier versions.

Tip: The colorDepth property represents the same thing as the pixelDepth property. Since all major browsers support colorDepth, use that property instead.


Syntax

screen.pixelDepth

Return Value

Type Description
Number The color resolution, in bits per pixel. Possible values:
  • 1 bit per pixel
  • 4 bits per pixel
  • 8 bits per pixel
  • 15 bits per pixel
  • 16 bits per pixel
  • 24 bits per pixel
  • 32 bits per pixel
  • 48 bits per pixel


Examples

More Examples

All screen properties in one example


Screen Object Reference Screen Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook