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


Web Studio Help nction graphic rgbcomponent.xml d138820e107 RGBComponent
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.”)
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.


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


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 )