Map and Table Calculation

CLRSAT( ) function

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

Syntax

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

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

Notes:

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator example:

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

returns the saturation component of class "Lake" from representation Landuse, e.g. 240.

TabCalc example:

Sat = CLRSAT(Color)

 

Landuse.rpr

Landunit

Colorname

Color

Sat

Agriculture

Yellow

(255, 255, 0)

240

Airport

Red

(255, 0, 0)

240

Bare soils

Brown

(164, 40, 40)

117

Forest

Forest Green

(48, 128, 76)

66

Grass

Yellow Green

(98, 98, 98)

0

Lake

Blue

(0, 0, 255)

240

Riverbed

Cyan

(0, 255, 255)

240

Rocks

Gray

(128, 128, 128)

0

Shrubs

Magenta

(255, 0, 255)

240

MapCalc example:

LandColor = MAPCOLOR(Landuse)

Saturation = CLRSAT(LandColor)

 

Landuse

LandColor

Saturation

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)
66 66 0
240 240 0
0 0 240

See also:

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