RGBComponent

RGBComponent is a built-in scripting function that gets the level of a color component (red, green, or blue) in a specified color.

Function Group Execution Windows Embedded Thin Client Mobile Access
RGBComponent Graphic Synchronous Supported Supported Supported Supported

Syntax

Web Studio Help nction graphic rgbcomponent.xml d138820e107 RGBComponent
numColor
The decimal code for a 24-bit RGB color, which can be any integer value between 0 and 16777215. (This color model is also known as “Truecolor” or “millions of colors.”)
numComponent
The color component for which you want to get the level: 0 is red, 1 is green, and 2 is blue.

Returned value

This function returns an integer value between 0 or 255, which represents the level of the color component in the specified color.

Notes

For a list of frequently used RGB color codes and their equivalent “plain English” names, see Color Interface.

Examples

Get the level of red in color code 13434828 (i.e., sea green):
  RGBComponent( 13434828, 0 )  
Get the level of the component specified by TagComponent in the color specified by TagCode:
  RGBComponent( TagCode, TagComponent )  

RGBComponent