VS:ColorIndexToRGBN
Jump to navigation
Jump to search
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Procedure ColorIndexToRGBN 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))
Parameter ignoreBlackBackground specifies whether the black background preference should be ignored.
If set to TRUE, black and white indexes will not be inverted in black background.
A color table listing with associated index values can be found in the Appendix.
PROCEDURE ColorIndexToRGBN(
color :INTEGER;
VAR red :LONGINT;
VAR green :LONGINT;
VAR blue :LONGINT;
ignoreBlackBackground :BOOLEAN);
def vs.ColorIndexToRGBN(color, ignoreBlackBackground): return (red, green, blue)
Parameters
color INTEGER Color index red LONGINT RGB color component value. green LONGINT RGB color component value. blue LONGINT RGB color component value. ignoreBlackBackground BOOLEAN Ignore black background preference setting or not.
Example
ColorIndexToRGBN(255,r,g,b,TRUE); {returns the color value components of the color index 255 (black 0, 0, 0)} {Because ignoreBlackBackground is set to TRUE, the result } {will always be black RGB color regardless of the black background }{preference setting.}
Version
Availability: from Vectorworks 2010
See Also
Functions:
- ColorIndexToRGB
- RGBToColorIndex
- RGBToColorIndexN
- VS:GetPenFore | VS:GetPenBack| VS:GetFillFore | VS:GetFillBack
Functions:
- [[VS:ColorIndexToRGB| ColorIndexToRGB]]
- [[VS:RGBToColorIndex| RGBToColorIndex]]
- [[VS:RGBToColorIndexN| RGBToColorIndexN]]
- [[VS:GetPenFore]] | [[VS:GetPenBack]]| [[VS:GetFillFore]] | [[VS:GetFillBack]]