PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Color Table Initialization

The core specification of Open Firmware defines a terminal emulation support package that does not include support for colors. The Macintosh Open Firmware implementation supports additional SGR parameters to allow client programs to display characters and logos in a 16-color model.

For this expanded terminal emulation support to work, Open Firmware device drivers for display devices must initialize the first 16 entries of their color table to values defined in Table 5-11, where values are defined in terms of the fraction of full saturation required for each of the primary red-green-blue (RGB) colors.

Table 5-11 Color table values 

Index

Red

Green

Blue

Color

0 0 0 0 Black
1 0 0 2/3 Blue
2 0 2/3 0 Green
3 0 2/3 2/3 Cyan
4 2/3 0 0 Red
5 2/3 0 2/3 Magenta
6 2/3 1/3 0 Brown
7 2/3 2/3 2/3 White
8 1/3 1/3 1/3 Gray
9 1/3 1/3 1 Light blue
10 1/3 1 1/3 Light green
11 1/3 1 1 Light cyan
12 1 1/3 1/3 Light red
13 1 1/3 1 Light magenta
14 1 1 1/3 Light yellow
15 1 1 1 Bright white

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)