Procedure RGBToColorIndex converts the VectorWorks palette colors from its' red, green, and blue component values to the colors' palette position index. Parameters red, green, and blue return the color components of the swatch, and parameter color is the palette position ID of the color swatch. RGB values are in the range of 0~65535.
A color table listing with associated index values can be found in the Script Appendix.
PROCEDURE RGBToColorIndex(
red : LONGINT;
green : LONGINT;
blue : LONGINT;
VAR color : INTEGER);def vs.RGBToColorIndex(red, green, blue):
return color| Name | Type | Description |
|---|---|---|
| red | LONGINT | RGB color component value. |
| green | LONGINT | RGB color component value. |
| blue | LONGINT | RGB color component value. |
| color | INTEGER | Color index. |
Functions:
Availability: from MiniCAD6.0