asp.net.ph

Skip Navigation Links

colorDepth Property

screen Properties   DHTML Object Properties


Retrieves the number of bits per pixel used for colors on the destination device or buffer.

Syntax


HTML N/A
Script [ iBitsPerPixel = ] screen.colorDepth

Possible Values


1, 4, 8, 15, 16, 24, 32 Integer specifying the number of bits per pixel to use for the off-screen buffer. The value 15 specifies 16 bits-per-pixel, in which only 15 bits are used in a 5-5-5 layout of RGB values.

The property is read-only with no default value.

Remarks

Retrieving the property's value through script enables the author to select an appropriate color to return to the browser.

If bufferDepth is 0 or -1, colorDepth is equal to the bits-per-pixel value for the screen or printer. If bufferDepth is nonzero, colorDepth is equal to bufferDepth.

Applies To

screen



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note