Map and Table Calculation

CLRHUE( ) function

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

Syntax

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

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

Notes:

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator example:

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

returns the hue component of class "Lake" from representation Landuse, e.g. 160.

TabCalc example:

Hue = CLRHUE(Color)

 

Landuse.rpr

Landunit

Colorname

Color

Hue

Agriculture

Yellow

(255, 255, 0)

40

Airport

Red

(255, 0, 0)

0

Bare soils

Brown

(164, 40, 40)

0

Forest

Forest Green

(48, 128, 76)

93

Grass

Yellow Green

(98, 98, 98)

0

Lake

Blue

(0, 0, 255)

160

Riverbed

Cyan

(0, 255, 255)

120

Rocks

Gray

(128, 128, 128)

0

Shrubs

Magenta

(255, 0, 255)

200

MapCalc example:

LandColor = MAPCOLOR(Landuse)

Hue = CLRHUE(LandColor)

 

Landuse

LandColor

Hue

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)
93 93 0
200 160 0
1 0 0

See also:

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