Skip to content

Latest commit

 

History

History
52 lines (43 loc) · 1.42 KB

File metadata and controls

52 lines (43 loc) · 1.42 KB

ColorIndexToRGB

Description

Procedure ColorIndexToRGB converts the VectorWorks palette colors from the colors' palette position index to its red, green, and blue component values. RGB values are in the range of 0~65535. (Black: (0, 0, 0), White: (65535, 65535, 65535))

A color table listing with associated index values can be found in the Script Appendix.

PROCEDURE ColorIndexToRGB(
				color     : INTEGER;
				VAR red   : LONGINT;
				VAR green : LONGINT;
				VAR blue  : LONGINT);
def vs.ColorIndexToRGB(color):
    return (red, green, blue)

Parameters

Name Type Description
color INTEGER Color index.
red LONGINT RGB color component value.
green LONGINT RGB color component value.
blue LONGINT RGB color component value.

Examples

VectorScript

ColorIndexToRGB(45, r, g, b);
{returns the color value components of the color at position 45}

Python

r, g, b = vs.ColorIndexToRGB(45)

See Also

Functions:

Version

Availability: from MiniCAD 6.0

Category