PalStatus

(Engine-Level Function)

Description: Returns the color intensities of the current palette. Maintained for backward compatibility only.
Returns: Numeric
Usage: Script or steady state.
Function Groups: Color,  Graphics
Related to:
Format: PalStatus(Color, RGBIndex)
Parameters:  
Color
Required. Any expression giving the color to examine. May be a number from 0 to 255 (from the VTScada palette) or an RGB value with alpha channel, expressed as "<AARRGGBB>".
RGBIndex
Required. Any numeric expression giving the color component to return. Red, green, blue, or alpha.

RGBIndex

Color Content

0

Red

1

Green

2

Blue

3Alpha channel
Comments: The returned number ranges from 0 to 1, and indicates the red, green, or blue color content of a color index, or the alpha channel (opacity) in the case of index 3.

Example:

ZText(10, 10, Concat("Red = " , PalStatus(14, 0)), 14, 0);
ZText(10, 20, Concat("Green = ", PalStatus(14, 1)), 14, 0);
ZText(10, 30, Concat("Blue = " , PalStatus(14, 2)), 14, 0);

This displays the color mix for color index 14 (yellow - FFFFFF00) in that color. The values displayed in this case will be 1, 1 and 0 respectively.