Map and Table Calculation

CLRINTENS( ) function

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

Syntax

CLRINTENS(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

CLRINTENS returns: a value
Domain: system domain Image
Value range: [0,240]

Notes:

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator example:

? CLRINTENS(RPRCOLOR(Landuse,"Lake"))

returns the intensity component of class "Lake" from representation Landuse, e.g. 80.

TabCalc example:

Intensity = CLRINTENS(Color)

 

Landuse.rpr

Landunit

Colorname

Color

Intensity

Agriculture

Yellow

(255, 255, 0)

160

Airport

Red

(255, 0, 0)

80

Bare soils

Brown

(164, 40, 40)

77

Forest

Forest Green

(48, 128, 76)

79

Grass

Yellow Green

(98, 98, 98)

92

Lake

Blue

(0, 0, 255)

80

Riverbed

Cyan

(0, 255, 255)

160

Rocks

Gray

(128, 128, 128)

120

Shrubs

Magenta

(255, 0, 255)

160

MapCalc example:

LandColor = MAPCOLOR(Landuse)

Intensity = CLRINTENS(LandColor)

 

Landuse

LandColor

Intensity

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)
79 79 120
160 80 92
0 92 80

See also:

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