1v.colors(1)                 GRASS GIS User's Manual                v.colors(1)
2
3
4

NAME

6       v.colors   -  Creates/modifies the color table associated with a vector
7       map.
8

KEYWORDS

10       vector, color table
11

SYNOPSIS

13       v.colors
14       v.colors --help
15       v.colors  [-rwldngac]  map=name   [layer=string]    use=string    [col‐
16       umn=name]       [range=min,max]       [color=style]       [raster=name]
17       [raster_3d=name]   [rules=name]   [rgb_column=name]   [--help]  [--ver‐
18       bose]  [--quiet]  [--ui]
19
20   Flags:
21       -r
22           Remove existing color table
23
24       -w
25           Only write new color table if it does not already exist
26
27       -l
28           List available rules then exit
29
30       -d
31           List available rules with description then exit
32           If a color rule is given, only this rule is listed
33
34       -n
35           Invert colors
36
37       -g
38           Logarithmic scaling
39
40       -a
41           Logarithmic-absolute scaling
42
43       -c
44           Convert color rules from RGB values to color table
45           Option ’rgb_column’ with valid RGB values required
46
47       --help
48           Print usage summary
49
50       --verbose
51           Verbose module output
52
53       --quiet
54           Quiet module output
55
56       --ui
57           Force launching GUI dialog
58
59   Parameters:
60       map=name [required]
61           Name of vector map
62           Or data source for direct OGR access
63
64       layer=string
65           Layer number or name
66           Vector  features can have category values in different layers. This
67           number determines which layer to use. When  used  with  direct  OGR
68           access this is the layer name.
69           Default: 1
70
71       use=string [required]
72           Source values
73           Options: attr, cat, z
74           Default: cat
75           attr: read values from attribute table (requires <column> option)
76           cat: use category values
77           z: use z coordinate (3D points or centroids only)
78
79       column=name
80           Name of column containing numeric data
81           Required for use=attr
82
83       range=min,max
84           Manually set range (refers to ’column’ option)
85           Ignored when ’rules’ given
86
87       color=style
88           Name of color table
89           Options:  aspect, aspectcolr, bcyr, bgyr, blues, byg, byr, celsius,
90           corine, curvature, differences, elevation, etopo2, evi, fahrenheit,
91           forest_cover, gdd, grass, greens, grey, grey.eq, grey.log, grey1.0,
92           grey255, gyr, haxby, inferno,  kelvin,  magma,  ndvi,  ndwi,  nlcd,
93           oranges,  plasma,  population, population_dens, precipitation, pre‐
94           cipitation_daily,  precipitation_monthly,  rainbow,  ramp,  random,
95           reds, roygbiv, rstcurv, ryb, ryg, sepia, slope, soilmoisture, srtm,
96           srtm_plus, terrain, viridis, water, wave
97            aspect: aspect oriented grey colors [range: map values]
98            aspectcolr: aspect oriented rainbow colors [range: 0 to 360]
99            bcyr: blue through cyan through yellow to red [range: map values]
100            bgyr: blue through green through yellow to red [range: map values]
101            blues: white to blue [range: map values]
102            byg: blue through yellow to green [range: map values]
103            byr: blue through yellow to red [range: map values]
104            celsius: blue to red for degree Celsius temperature [range: -80 to
105           80]
106            corine: EU Corine land cover colors [range: 111 to 995]
107            curvature:   for   terrain   curvatures   (from   v.surf.rst   and
108           r.slope.aspect) [range: map values]
109            differences: differences oriented colors [range: map values]
110            elevation: maps relative ranges  of  raster  values  to  elevation
111           color ramp [range: map values]
112            etopo2:  colors for ETOPO2 worldwide bathymetry/topography [range:
113           -11000 to 8850]
114            evi: enhanced vegetative index colors [range: -1 to 1]
115            fahrenheit: blue to red for Fahrenheit temperature [range: -112 to
116           176]
117            forest_cover: percentage of forest cover [range: 0 to 100]
118            gdd: accumulated growing degree days [range: 0 to 6000]
119            grass: GRASS GIS green (perceptually uniform) [range: map values]
120            greens: white to green [range: map values]
121            grey: grey scale [range: map values]
122            grey.eq: histogram-equalized grey scale [range: map values]
123            grey.log: histogram logarithmic transformed grey scale [range: map
124           values]
125            grey1.0: grey scale for raster values between 0.0-1.0 [range: 0 to
126           1]
127            grey255:  grey  scale for raster values between 0-255 [range: 0 to
128           255]
129            gyr: green through yellow to red [range: map values]
130            haxby: relative colors for bathymetry or  topography  [range:  map
131           values]
132            inferno:  perceptually  uniform  sequential  color  table  inferno
133           [range: map values]
134            kelvin: blue to red for temperature in Kelvin scale [range: 193.15
135           to 353.15]
136            magma:  perceptually  uniform sequential color table magma [range:
137           map values]
138            ndvi: Normalized Difference Vegetation Index colors [range: -1  to
139           1]
140            ndwi:  Normalized  Difference  Water  Index colors [range: -200 to
141           200]
142            nlcd: US National Land Cover Dataset colors [range: 0 to 95]
143            oranges: white to orange [range: map values]
144            plasma: perceptually uniform sequential color table plasma [range:
145           map values]
146            population:  color  table covering human population classification
147           breaks [range: 0 to 2e+09]
148            population_dens: color table  covering  human  population  density
149           classification breaks [range: 0 to 1e+09]
150            precipitation:  precipitation color table (0..2000mm) [range: 0 to
151           7000]
152            precipitation_daily: precipitation color table (0..1000mm) [range:
153           0 to 10000]
154            precipitation_monthly:   precipitation   color  table  (0..1000mm)
155           [range: 0 to 1000]
156            rainbow: rainbow color table [range: map values]
157            ramp: color ramp [range: map values]
158            random: random color table [range: map values]
159            reds: white to red [range: map values]
160            roygbiv:  [range: map values]
161            rstcurv: terrain curvature (from r.resamp.rst) [range: map values]
162            ryb: red through yellow to blue [range: map values]
163            ryg: red through yellow to green [range: map values]
164            sepia: yellowish-brown through to white [range: map values]
165            slope: r.slope.aspect-type slope colors  for  raster  values  0-90
166           [range: 0 to 90]
167            soilmoisture: soilmoisture color table (0.0-1.0) [range: 0 to 1]
168            srtm: color palette for Shuttle Radar Topography Mission elevation
169           [range: -11000 to 8850]
170            srtm_plus: color palette for Shuttle Radar Topography Mission ele‐
171           vation (with seafloor colors) [range: -11000 to 8850]
172            terrain:  global  elevation  color table covering -11000 to +8850m
173           [range: -11000 to 8850]
174            viridis:  perceptually  uniform  sequential  color  table  viridis
175           [range: map values]
176            water: water depth [range: map values]
177            wave: color wave [range: map values]
178
179       raster=name
180           Raster map from which to copy color table
181
182       raster_3d=name
183           3D raster map from which to copy color table
184
185       rules=name
186           Path to rules file
187
188       rgb_column=name
189           Name of color column to populate RGB values
190           If not given writes color table
191

DESCRIPTION

193       v.colors  allows  creating  or  modifying color table associated with a
194       vector map similarly to r.colors for raster maps.
195
196       Color rules are  built  from  features  category  values  (use=cat)  or
197       numeric  data column (use=attr) defined by column option. For 3D vector
198       maps is allowed to define color rules  based  on  points  or  centroids
199       z-coordinate (use=z). 3D vector lines are not supported.
200
201       The  raster  option  allows  user to specify a raster map from which to
202       copy the color table, similarly raster_3d option for 3D raster map.
203
204       The rules color table type will cause  v.colors  to  read  color  table
205       specifications  from  given file and will build the color table accord‐
206       ingly. See r.colors manual page for details.
207
208       If the user specifies the -w flag, the current color table file for the
209       input  map  will not be overwritten. This means that the color table is
210       created only if the vector map does not already have a color table.  If
211       this  option  is  not specified, the color table will be created if one
212       does not exist, or modified if it does.
213
214       Alternatively the  color  rules  can  be  stored  in  a  string  column
215       (rgb_column)  by  saving  the  RRR:GGG:BBB values suitable for use with
216       d.vect.
217

NOTES

219       For vector maps with a large number of features it’s more convenient to
220       store  color  rules in an attribute column (given by rgb_column) rather
221       then in a color table file. Reading color tables with  more  then  1000
222       items is slow.
223

EXAMPLES

225   Define color table based on categories
226       Define color table wave based on categories from layer 1
227       v.colors map=soils_general layer=1 color=wave
228
229   Define color table based on attribute values
230       Define  color  table  ryg  based  on values from attribute column AREA.
231       Attribute table is linked to layer 1.
232       v.to.db map=soils_general layer=1 option=area column=AREA
233       v.colors map=soils_general layer=1 color=wave use=attr column=AREA
234
235   Define color table stored as RGB values in attribute table
236       Write color values to the attribute table (column GRASSRGB) instead  of
237       creating color table.
238       v.colors map=soils_general layer=1 color=wave use=attr column=AREA rgb_column=GRASSRGB
239       # See some GRASSRGB values:
240       v.db.select map=soils_general where="cat < 4"
241       cat|OBJECTID|AREA|PERIMETER|GSLNC250_|GSLNC250_I|GSL_NAME|GRASSRGB
242       1|1|0|164616.125|2|1|NC113|212:42:127
243       2|2|0|30785.529297|3|2|NC096|212:42:127
244       3|3|0|87572.882812|4|3|NC097|212:42:127
245
246   Convert RGB attribute values into color table
247       Convert existing RGB values to color table rules.
248       v.colors -c map=soils_general rgb_column=GRASSRGB
249       Note that in this case the vector map has a proper color table assigned
250       (check by v.colors.out) together with GRASSRGB attribute  column.  Also
251       note  that color table is preferred over RGB values stored in attribute
252       table.
253
254   Remove existing color table
255       Existing color table can be removed by -r flag.
256       v.colors -r map=soils_general
257       Before removing color table you can store color rules to  the  file  by
258       v.colors.out and later to assign by rules option.
259       v.colors.out map=soils_general rules=soils.colr
260       v.colors map=soils_general rules=soils.colr
261       To drop RGB column use v.db.dropcolumn.
262       v.db.dropcolumn map=soils_general column=GRASSRGB
263

SEE ALSO

265        d.vect, r.colors, r.colors.out, r3.colors, r3.colors.out, v.colors.out
266
267       See also wiki page Color tables (from GRASS User Wiki)
268
269       ColorBrewer is an online tool designed to help people select good color
270       schemes for maps and other graphics.
271

AUTHORS

273       Martin Landa, OSGeoREL, Czech Technical  University  in  Prague,  Czech
274       Republic
275

SOURCE CODE

277       Available at: v.colors source code (history)
278
279       Main  index  | Vector index | Topics index | Keywords index | Graphical
280       index | Full index
281
282       © 2003-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual
283
284
285
286GRASS 7.8.5                                                        v.colors(1)
Impressum