I was trying to build up a 12-bit color table to use when building apps. for Nokia devices Series 60 and Series 40.
Since I've been working for a while on Nokia 9210 (it has a 12-bit screen depth as well), I normally used a custom 12-bit color table in the fashion like 0xR0G0B0 (e.g. the hex code for a fully-satureted red [0xFF0000] tranforms in this 12 bit device on 0xF00 that corresponds a visible color 0xF00000).
I assumed it was the same on Series 60 and Series 40 devices, but I realized the RED in a Nokia 7210 is definetely "brighter" (looks more like a fully-satureted one), so I made some test.
On the Nokia 7210 emulator it seems something really weird comes out.
Here's a few examples (for a generic component hex code) made with the 7210 emu and Photoshop =) :
- values in the range [0x00,0x10] tranform to 0x00
- values in the range [0x11,0x21] tranform to 0x11
- values in the range [0x22,0x32] tranform to 0x22
- values in the range [0x33,0x43] tranform to 0x33
- values in the range [0xEE,0xFE] tranform to 0xEE
- 0xFF tranforms to 0xFF
It seems there's no possible way to get a color component like 0xF00000, i.e. a 24-bit color of 0xF00000 in 12-bit RGB value corresponds to 0xF00 on Nokia 9210 ("visible" color 0xF00000) and 0xE00 on Nokia 7210 ("visible" 0xEE0000).
If you try to build an array of N hex-color values that fade from a dark color to its lighter hue and paint on screen N rectangles you can realize that even in the real device the colors you try to draw appear just the same when they fall into one of the ranges described above.
Moreover, if you want to setColor(..) to a plain red you would use 0xFF0000 on both the devices, but with the 9210 you'd get a visible 0xF00000, while on the 7210 you'd find a nice 0xFF0000 color value.