1v.colors(1)                   Grass 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           gdd, grass, greens, grey, grey.eq, grey.log, grey1.0, grey255, gyr,
92           haxby, inferno, kelvin, magma, ndvi, ndwi, oranges, plasma, popula‐
93           tion, population_dens, precipitation, precipitation_daily, precipi‐
94           tation_monthly, rainbow, ramp, random, reds, roygbiv, rstcurv, ryb,
95           ryg, sepia, slope, soilmoisture, srtm, srtm_plus, terrain, viridis,
96           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            gdd: accumulated growing degree days [range: 0 to 6000]
118            grass: GRASS GIS green (perceptually uniform) [range: map values]
119            greens: white to green [range: map values]
120            grey: grey scale [range: map values]
121            grey.eq: histogram-equalized grey scale [range: map values]
122            grey.log: histogram logarithmic transformed grey scale [range: map
123           values]
124            grey1.0: grey scale for raster values between 0.0-1.0 [range: 0 to
125           1]
126            grey255:  grey  scale for raster values between 0-255 [range: 0 to
127           255]
128            gyr: green through yellow to red [range: map values]
129            haxby: relative colors for bathymetry or  topography  [range:  map
130           values]
131            inferno:  perceptually  uniform  sequential  color  table  inferno
132           [range: map values]
133            kelvin: blue to red for temperature in Kelvin scale [range: 193.15
134           to 353.15]
135            magma:  perceptually  uniform sequential color table magma [range:
136           map values]
137            ndvi: Normalized Difference Vegetation Index colors [range: -1  to
138           1]
139            ndwi:  Normalized  Difference  Water  Index colors [range: -200 to
140           200]
141            oranges: white to orange [range: map values]
142            plasma: perceptually uniform sequential color table plasma [range:
143           map values]
144            population:  color  table covering human population classification
145           breaks [range: 0 to 2e+09]
146            population_dens: color table  covering  human  population  density
147           classification breaks [range: 0 to 1e+09]
148            precipitation:  precipitation color table (0..2000mm) [range: 0 to
149           7000]
150            precipitation_daily: precipitation color table (0..1000mm) [range:
151           0 to 10000]
152            precipitation_monthly:   precipitation   color  table  (0..1000mm)
153           [range: 0 to 1000]
154            rainbow: rainbow color table [range: map values]
155            ramp: color ramp [range: map values]
156            random: random color table [range: map values]
157            reds: white to red [range: map values]
158            roygbiv:  [range: map values]
159            rstcurv: terrain curvature (from r.resamp.rst) [range: map values]
160            ryb: red through yellow to blue [range: map values]
161            ryg: red through yellow to green [range: map values]
162            sepia: yellowish-brown through to white [range: map values]
163            slope: r.slope.aspect-type slope colors  for  raster  values  0-90
164           [range: 0 to 90]
165            soilmoisture: soilmoisture color table (0.0-1.0) [range: 0 to 1]
166            srtm: color palette for Shuttle Radar Topography Mission elevation
167           [range: -11000 to 8850]
168            srtm_plus: color palette for Shuttle Radar Topography Mission ele‐
169           vation (with seafloor colors) [range: -11000 to 8850]
170            terrain:  global  elevation  color table covering -11000 to +8850m
171           [range: -11000 to 8850]
172            viridis:  perceptually  uniform  sequential  color  table  viridis
173           [range: map values]
174            water: water depth [range: map values]
175            wave: color wave [range: map values]
176
177       raster=name
178           Raster map from which to copy color table
179
180       raster_3d=name
181           3D raster map from which to copy color table
182
183       rules=name
184           Path to rules file
185
186       rgb_column=name
187           Name of color column to populate RGB values
188           If not given writes color table
189

DESCRIPTION

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

NOTES

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

EXAMPLES

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

SEE ALSO

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

AUTHORS

271       Martin Landa, OSGeoREL, Czech Technical  University  in  Prague,  Czech
272       Republic
273

SOURCE CODE

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