Atari ST series Technical Reference Manual page 74

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

possible colors to choose from. The default values in the
color registers at power-up time are:
Table 4-1.
Default Color Settings
Register
Red
0
7
1
7
2
0
3
7
4
0
5
7
0
6
7
5
8
3
9
7
10
3
11
7
12
3
13
7
14
3
15
0
You can change the color in an individual color register,
however, using the XBIOS function Setcolor(), whose syntax is
int oldcolor, register, newcolor;
oldcolor = Setcolor(register, newcolor);
where register is the number of the hardware color register to
change (0-15), and newcolor is a 16-bit color word, the low
three nybbles of which are used for the red, green, and blue
values respectively. For example, a value of 0x732 would in­
dicate a red level of 7, a green level of 3, and a blue level of
2. The value contained in the color register prior to the call is
returned in oldcolor. If newcolor is negative, the contents of
the register are not changed; only the current color value is
returned.
Since there are 16 hardware registers, setting them one
at a time could be somewhat inconvenient, so the XBIOS
provides a function that allows you to set an entire color pal­
ette at once. This function is called Setpalette(), and its syn­
tax is:
int palette[16];
Setpalette(palette);
66
CHAPTER 4
Green
Blue
7
7
0
0
7
0
7
0
0
7
0
7
7
7
5
5
3
3
3
3
7
3
7
3
3
7
7
3
7
7
0
0
Color
White
Red
Green
Yellow
Blue
Magenta
Cyan
Light Gray
Dark Gray
Light Red
Light Green
Light Yellow
Light Blue
Light Magenta
Light Cyan
Black

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents