Color function

Official Content
This documentation is valid for:

Returns a number representing an RGB color value.

Syntax

Color(gx_color)

Type returned:
Numeric

Where:
gx_color
     Must be a constant value. It cannot be an attribute or variable.

Color abbreviations:

'WHT'    white
'BLK'     black
'RED'     red
'GRN'    green
'BRW'    brown
'MGN'    magenta
'BLU'     blue
'CYN'     cyan
'YLW'     yellow
'X'         'no-display'

Description

Controls that accept a color specification expect that specification to be a number representing an RGB color value. An RGB color value specifies the relative intensity of red, green, and blue, causing a specific color to be displayed.

This function is used instead of the RGB Function when the corresponding RGB (red, green, blue) values are not remembered. It converts a valid GeneXus color into an RGB value.

Example

ProdDesc.Backcolor = Color('BLU')

ProdDesc is an Edit control and we want its backcolor to be blue.

Scope

Objects Procedure object, Transaction object, Web Panel object
Languages .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
Interfaces Web, Win
   

See also

RGB Function
Color rule