colorDepth property (screen)
Retrieves the number of bits used to represent the color of a single pixel on the screen or in the buffer when off-screen buffering is allowed.
The value of the colorDepth property can be modified with the bufferDepth property. The pixelDepth property is identical to the colorDepth property, but not supported in Internet Explorer before version 9.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Integer that sets or retrieves the number of bits.
One of the following values:
|1 bit per pixel.|
|4 bits per pixel.|
|8 bits per pixel.|
|15 bits per pixel. Same as 16 but only 15 bits are used.|
|16 bits per pixel.|
|24 bits per pixel.|
|32 bits per pixel.|
|48 bits per pixel.|
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the bufferDepth and colorDepth properties:
Did you find this example helpful?
User Contributed Comments