Difference between revisions of "84PCSE:BCALLs:5626"
From WikiTI
(GetColorValue) |
(No difference)
|
Latest revision as of 18:06, 19 October 2013
Synopsis
Unofficial Name: GetColorValue
BCALL Address: 5626h
Look up the RGB value for one of the 15 standard colors in the graphing color palette.
Inputs
- A = color index (1 to 15)
Outputs
- DE = color value (RGB-565)
Destroys
- F
Comments
The palette used by this routine is as follows:
| Index | Value | R | G | B | Name |
|---|---|---|---|---|---|
| 1 | 001F | 0 | 0 | 31 | Blue |
| 2 | F800 | 31 | 0 | 0 | Red |
| 3 | 0000 | 0 | 0 | 0 | Black |
| 4 | F81F | 31 | 0 | 31 | Magenta |
| 5 | 04E0 | 0 | 39 | 0 | Green |
| 6 | FC64 | 31 | 35 | 4 | Orange |
| 7 | B100 | 22 | 8 | 0 | Brown |
| 8 | 0010 | 0 | 0 | 16 | Navy |
| 9 | 049F | 0 | 36 | 31 | Light Blue |
| 10 | FFE0 | 31 | 63 | 0 | Yellow |
| 11 | FFFF | 31 | 63 | 31 | White |
| 12 | E71C | 28 | 56 | 28 | Light Gray |
| 13 | C618 | 24 | 48 | 24 | Medium Gray |
| 14 | 8C51 | 17 | 34 | 17 | Gray |
| 15 | 52AA | 10 | 21 | 10 | Dark Gray |
A = 0 (which, in the graph buffer, represents a "transparent" pixel) also returns white. Values of A greater than 15 will return garbage.