Highcolour
From Wikipedia, the free encyclopedia
Color depth |
---|
8-bit color |
Related |
Highcolour graphics (variously spelled Hicolour, Highcolor, and Hicolor, and known as Thousands of colors on a Macintosh) is a method of storing image information in a computer's memory such that each pixel is represented by two bytes. Usually the colour is represented by all 16 bits, but some video chipsets also support 15 bit highcolour.
Contents |
[edit] 15-bit highcolour
In 15 bit highcolour, one of the bits of the two bytes is ignored, and the remaining 15 bits are split between the red, green, and blue components of the final colour, like this:
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 09 | 08 | 07 | 06 | 05 | 04 | 03 | 02 | 01 | 00 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Data | x | R | R | R | R | R | G | G | G | G | G | B | B | B | B | B |
Each of the RGB components has 5 bits associated, giving 2^5 = 32 intensities of each hue. This allows 32768 possible colours for each pixel.
The popular Cirrus Logic graphics chips of the early 1990s made use of the spare high-order bit for their so-called "mixed" video modes: with bit 15 clear, bits 0 through 14 would be treated as an RGB value as described above, while with bit 15 set, bit 0 through 7 would be interpreted as an index into a 256-color palette. This would have enabled display of (comparatively) high-quality color images side by side with palette-animated screen elements, but in practice, this feature was hardly used by any software.
[edit] 16-bit highcolour
When all 16 bits are used, one of the hues (usually green, more on next paragraph) gets an extra bit, allowing a 64 levels of intensity for that hue, and a total of 65536 available colours. There is a problem with doing this because the green channel can have a different value than the other two. Suppose we wish to encode the 24-bit colour rgb (40,40,40) with 16 bits. 40 in binary is 00101000. The red and blue channels will take the 5 most significant bits, and will have a value of 00101, or 5 on a scale from 0 to 31 (16.1%). The green channel, with 6 bits of precision, will have a value of 001010, or 10 on a scale from 0 to 63 (15.9%). Because of this, the colour rgb(40,40,40) will have a slight green tinge when displayed in 16 bits. Note that 40 on a scale from 0 to 255 is 15.7%.
The reason why green is usually chosen for the extra bit in 16 bits is because the human eye has its highest sensitivity for green shades. You can convince yourself of that by looking at the following picture (note: this will work only if your display is truecolour, e.g. 24 or 32 bits) where we show off dark shades of red, green and blue using 128 levels of intensities for each hue (7 bits); if you're not visually impaired, bring your eyes closer to the screen for a moment: you can easily see the lines of green, while you have difficulties to see the lines of red, and you almost can't distinguish the lines of blue. More rarely, some systems support having the extra bit of colour depth on the red or blue channel, usually in applications where that colour is more prevalent (photographing of skin tones or skies, for example).
[edit] Other notes
Unlike Planar or Chunky graphics, there is no need for a colour look-up table (CLUT, or palette) when in Highcolour mode, because there are enough available colours per pixel to represent graphics and photos reasonably satisfactorily.