Map and Table Calculation

RPRCOLOR( ) function

Returns the (R,G,B) color of a certain class Class or value Value from a representation Representation of type Class or type Value.

Syntax

RPRCOLOR(Representation, Value)
RPRCOLOR(Representation, "Class")

Input

Representation is a representation
Value is a value
Class is a class name

Output

RPRCOLOR returns: a color
Domain: system domain Color

Tips:

Usable in

MapCalc, TabCalc, Simple calculators

Examples

Pocket line calculator example:

? RPRCOLOR(Suitability,"4")

returns the color of class 4 in a map with suitability classes

? RPRCOLOR(Landuse,"Forest")

returns the color of land use Forest in map Landuse, e.g. (0,255,0)

? RPRCOLOR(DEM,3000)

returns the color of value 3000 from representation DEM, e.g. (255,255,128)

TabCalc example:

Using Table Calculation, you have the ability to read colors from a representation into another table. Because a color should be retrieved for every item in the domain, you can use the predefined variable %K.

OutCol = RPRCOLOR(Landuse,%K)

Landuse.tbt

Landuse.rpr

Landunit

Landunit

Color

Agriculture

Agriculture

(255, 255, 0)

Airport

Airport

(255, 0, 0)

Bare soils

Bare soils

(164, 40, 40)

Forest

Forest

(48, 128, 76)

Grass

Grass

(98, 98, 98)

Lake

Lake

(0, 0, 255)

Riverbed

Riverbed

(0, 255, 255)

Rocks

 

Rocks

(128, 128, 128)

Shrubs

Shrubs

(255, 0, 255)

 

Landuse.tbt

Landunit

Color

Agriculture

(255, 255, 0)

Airport

(255, 0, 0)

Bare soils

(164, 40, 40)

Forest

(48, 128, 76)

Grass

(98, 98, 98)

Lake

(0, 0, 255)

Riverbed

(0, 255, 255)

Rocks

(128, 128, 128)

Shrubs

(255, 0, 255)

The expression returns for every item in the attribute table Landuse.tbt the color which was described in the representation Landuse.rpr.

See also:

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