Detemining screen color depth
This snippet demonstrates how to retrieve the screen color depth of S60 3rd Edition devices. This snippet can be self-signed.
Some color depths for S60 3rd Edition devices are 16 bit (65,536), 18 bit (262,144), and 24 bit (16,777,216). Some devices that have these color depths: N92 (16 bit), 3250 (18 bit), and E61 (24 bit).
An application could detect the color depth and load compatible images (that have the same color depth as the screen), for example.
//necessary header file
//displayColors contains color depth of this device
//retrieve EDisplayColors value of this phone
HAL::Get( HALData::EDisplayColors, displayColors );
The displayColors variable contains the color depth of this device. For example, on a N78 this value would be 16,777,216 (24 bit).