Color function

Official Content
This documentation is valid for:

Returns a number representing an RGB color value.

Syntax

Color(gx_color)

Where:

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

Type returned:
Numeric

Scope

Objects: Procedure, Transaction, Web Panel Data Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

Description

The controls that accept a color specification, expect it 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.

Color abbreviations:

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

Samples

ProdDesc.Backcolor = Color('BLU')

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

See Also

RGB function
Color rule