Name
pixelDepth — NN 4 IE n/a DOM n/a
Synopsis
Read-only
Returns the number of bits per pixel used to display color in the
video monitor. This value is similar to the
colorDepth
property, but it is not influenced by a
potential custom color palette, as colorDepth
is.
Example
if (screen.pixelDepth > 8) { document.all.pretty.color = "cornflowerblue" } else { document.all.pretty.color = "blue" }
Value
Integer.
Default
Current video control panel setting.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.