La opción -q hace que el comando se ejecute en modo silencioso
Map es el mapa al que se va a crear una nueva tabla de colores. Color es la paleta de colores en la que se va a basar la nueva tabla. Rast es un fichero del que se va a copiar la tabla de color. La paleta debe ser alguna de las siguientes:
color type description
aspect (aspect
oriented grey colors)
grey
(grey scale)
grey.eq (histogram-equalized
grey scale)
gyr
(green through yellow to red colors)
rainbow (rainbow
color table)
ramp
(color ramp)
random (random
color table)
ryg
(red through yellow to green colors)
wave
(color wave)
rules
(create new color table based on
user-specified rules)
Color table types aspect, grey, grey.eq (histogram-equalized grey scale), gyr (green-yellow-red), rainbow, ramp, ryg (red-yellow-green), random, and wave are pre-defined color tables that r.colors knows how to create without any further input.
The rules color table type will cause r.colors to read color table specifications from standard input (stdin) and will build the color table accordingly.
Using color table type rules, there are three ways to build a color table: by color list, by category values, and by "percent" values.
Building a customized color table by color list is the simplest of the three rules methods: just list the colors you wish to appear in the color table in the order that you wish them to appear. Use the standard GRASS color names: white, black, red, green, blue, yellow, magenta, cyan, aqua, grey, gray, orange, brown, purple, violet, and indigo.
For example, to create a color table for the raster map layer elevation that assigns greens to low map category values, browns to the next larger map category values, and yellows to the still larger map category values, one would type:
r.colors map=elevation color=rules
green
brown
yellow
end
To build a color table by category values' indices, the user should determine the range of category values in the raster map layer with which the color table will be used. Specific category values will then be associated with specific colors. Note that a color does not have to be assigned for every valid category value because r.colors will interpolate a color ramp to fill in where color specification rules have been left out. The format of such a specification is as follows:
category_value color_name
category_value color_name
.. ..
.. ..
category_value color_name
end
Each category value must be valid for the raster map layer, category values must be in ascending order and only use standard GRASS color names (see above).
Colors can also be specified by color numbers each in the range 0-255. The format of a category value color table specification using color numbers instead of color names is as follows:
category_value red_number green_number blue_number
category_value red_number green_number blue_number
.. .. .. ..
.. .. .. ..
category_value red_number green_number blue_number
end
Specifying a color table by "percent" values allows one to treat a color table as if it were numbered from 0 to 100. The format of a "percent" value color table specification is the same as for a category value color specification, except that the category values are replaced by "percent" values, each from 0-100, in ascending order. The format is as follows:
percent_value% color_name
percent_value% color_name
.. ..
.. ..
percent_value% color_name
end
Using "percent" value color table specification rules, colors can also be specified by color numbers each in the range 0-255. The format of a percent value color table specification using color numbers instead of color names is as follows:
percent_value% red_number green_number blue_number
percent_value% red_number green_number blue_number
.. .. .. ..
.. .. .. ..
percent_value% red_number green_number blue_number
end
Note that you can also mix these three methods of color table specification; for example:
0 black
10% yellow
78 blue
magenta
purple
brown
100% 0 255 230
end
1 red
2 green
3 blue
end
The color table can then by assigned to map threecats by typing the following command at the GRASS> prompt: