version 6.0
DR Color to index (color) Integer
| Parameter | Type | Description | |
| color | Longint | Color value | |
| Function result | Integer | Index of color on the 4D color palette |
Description
The command DR Color to index returns the index of the color closest to color on the 4th Dimension color palette.
For example, if a particular shade of blue is specified by color, DR Color to index returns the closest shade of blue found on the 4th Dimension palette. Colors on the 4th Dimension palette are numbered 1 through 256.
Example
The following example places into the Color variable the palette index of the color specified by the RGB values:
Color := DR Color to index (DR RGB to color (65535;0;18405))
See Also