Map and Table Calculation

CLRGREEN( ) function

Returns the Green component of an (R,G,B) color.

Syntax

CLRGREEN(Color)

Input

Color is a map or a column with the Color domain or a picture domain, or an expression which results in a color
Domain type: system domain Color or a Picture domain

Output

CLRGREEN returns: a value
Domain: system domain Image

Note:

The CLRGREEN(Color) function is equivalent to MAPCOLORSEP(InMap, Green) operation.

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator example:

? CLRGREEN(RPRCOLOR(Landuse,"Forest"))

returns the green component of class "Forest" from representation Landuse, e.g. 128.

TabCalc example:

Green = CLRGREEN(Color)

 

Landuse.rpr

Landunit

Colorname

Color

Green

Agriculture

Yellow

(255, 255, 0)

255

Airport

Red

(255, 0, 0)

0

Bare soils

Brown

(164, 40, 40)

40

Forest

Forest Green

(48, 128, 76)

128

Grass

Yellow Green

(98, 98, 98)

98

Lake

Blue

(0, 0, 255)

0

Riverbed

Cyan

(0, 255, 255)

255

Rocks

Gray

(128, 128, 128)

128

Shrubs

Magenta

(255, 0, 255)

0

MapCalc example:

LandColor = MAPCOLOR(Landuse)

Green = CLRGREEN(LandColor)

 

Landuse

LandColor

Green

Forest Forest Rocks
Shrubs Lake Grass
? Grass Airport
(48,128,76) (48,128,76) (128,128,128)
(255,0,255) (0,0,255) (98,98,98)
(0,0,0) (98,98,98) (255,0,0)
128 128 128
0 0 98
0 98 0

See also:

COLOR CLRRED CLRYELLOW CLRHUE
MAPCOLOR CLRBLUE CLRMAGENTA CLRSAT
RPRCOLOR CLRCYAN CLRINTENS
    CLRGREY COLORHSI