Macintosh II: Color Picker and Exact Color Match Issue



If you have a 4-bit color card in your Macintosh, you may have noticed
that the Color Picker displays the entire range of over 16 million colors
in the top-half of the color box to the left of the color wheel (inside
the color window). However, when you choose color, the actual color is
some ugly approximation. This anomaly rests with the Color Picker and the
device's Color Look-Up Table (CLUT).

The Color Picker Package is a tool that presents a standard interface for
color selection. With this dialog, any application can ask the user to
choose a color. The Color Picker displays all 16.8 million colors
available through Color QuickDraw. They are the colors that are available
to any color device, regardless of the number of bits that device can
display. A 4-bit color card can display only 16 of the 16.8 million
different colors at one time. An 8-bit color card can display 256 of the
16.8 million colors at one time. The number of bits that the card has
does not limit the number of colors that are available to be shown, but
rather it limits the number of colors that the device can show at one
time.

The Color Picker returns the RGB color value of the chosen color to the
application to do with it what it wants. The application has the choice
of going to the device's Color Look-Up Table (CLUT) and approximating the
color by picking the color closest to the chosen color, or replacing an
entry in the device's CLUT to show the exact color picked. The Color
Picker, itself, displays the exact color by borrowing a color table entry
from the CLUT and changing it according to the color selected. When it's
done, it puts everything back to the way it was. Thus, when you quit the
Color Picker, the CLUT is the same as when Color Picker was called.

The choice of showing the exact color or an approximation is entirely up
to the application. The Color Picker is not aware of the colors available
in the CLUT, nor does it care. There may be more than one device that the
application wants to display color on. In such a case, the CLUT for each
of these devices will probably be different. This gives the application
the ability to save the RGB color values returned from Color Picker and
display a more or less accurate approximation of that color, depending
upon the device used.


Published Date: Feb 18, 2012