version 1
CT Color to index (color) Integer
Parameter | Type | Description | |
color | Longint | Color value (internal to 4D Chart) | |
Function result | Integer | Index of the closest color in the 4D palette |
Description
CT Color to index returns the index of the color closest to color on the 4th Dimension color palette.
For instance, if a particular shade of blue is specified, CT Color to index returns the closest shade of blue in the 4th Dimension palette. Colors on the 4th Dimension palette are numbered from 1 to 256.
Example
This example places the palette index of the color closest to red in the vColor variable:
vColor:=CT Color to index(CT RGB to color(56683;2242;1698))
See Also
CT COLOR TO RGB, CT Index to color, CT RGB to color.