Screen Object
The colorDepth property returns the bit depth of the color palette for displaying images (in bits per pixel).
![]()
The colorDepth property is supported in all major browsers.
Return the bit depth of the color palette:
The output of the code above will be:
Display an alternate background color for 8 bit screens (to avoid that 8 bit screens, which do not support the modern color, uses an ugly substitute color instead):
All screen properties in one example
Screen Object
Your message has been sent to W3Schools.