MSDN Library

colorDepth property

[This documentation is preliminary and is subject to change.]

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


HRESULT value = object.get_colorDepth(* p);

Property values

Type: long

1, 4, 8, 15, 16, 24, 32

Number of bits per pixel, expressed as an integer, 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.


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



Build date: 6/6/2012

Community Additions

© 2015 Microsoft