Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.26 KB

File metadata and controls

45 lines (34 loc) · 1.26 KB

RGBToColorIndex

Description

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

Parameters

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.

Remarks

Examples

SelectandDelObjects

See Also

Functions:

Version

Availability: from MiniCAD6.0

Category