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 [-rwlngac] map=name  [layer=string]  use=string  [column=name]
16       [range=min,max]     [color=style]     [raster=name]    [raster_3d=name]
17       [rules=name]    [rgb_column=name]    [--help]   [--verbose]   [--quiet]
18       [--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       -n
31           Invert colors
32
33       -g
34           Logarithmic scaling
35
36       -a
37           Logarithmic-absolute scaling
38
39       -c
40           Convert color rules from RGB values to color table
41           Option ’rgb_column’ with valid RGB values required
42
43       --help
44           Print usage summary
45
46       --verbose
47           Verbose module output
48
49       --quiet
50           Quiet module output
51
52       --ui
53           Force launching GUI dialog
54
55   Parameters:
56       map=name [required]
57           Name of vector map
58           Or data source for direct OGR access
59
60       layer=string
61           Layer number or name
62           Vector  features can have category values in different layers. This
63           number determines which layer to use. When  used  with  direct  OGR
64           access this is the layer name.
65           Default: 1
66
67       use=string [required]
68           Source values
69           Options: attr, cat, z
70           Default: cat
71           attr: read values from attribute table (requires <column> option)
72           cat: use category values
73           z: use z coordinate (3D points or centroids only)
74
75       column=name
76           Name of column containing numeric data
77           Required for use=attr
78
79       range=min,max
80           Manually set range (refers to ’column’ option)
81           Ignored when ’rules’ given
82
83       color=style
84           Name of color table
85           Options:  aspect, aspectcolr, bcyr, bgyr, blues, byg, byr, celsius,
86           corine, curvature, differences, elevation, etopo2, evi, fahrenheit,
87           gdd, grass, greens, grey, grey.eq, grey.log, grey1.0, grey255, gyr,
88           haxby, kelvin, ndvi, ndwi,  oranges,  population,  population_dens,
89           precipitation, precipitation_daily, precipitation_monthly, rainbow,
90           ramp, random, reds, roygbiv, rstcurv, ryb, ryg, sepia, slope, soil‐
91           moisture, srtm, srtm_plus, terrain, viridis, water, wave
92            aspect: aspect oriented grey colors
93            aspectcolr: aspect oriented rainbow colors
94            bcyr: blue through cyan through yellow to red
95            bgyr: blue through green through yellow to red
96            blues: white to blue
97            byg: blue through yellow to green
98            byr: blue through yellow to red
99            celsius: blue to red for degree Celsius temperature
100            corine: EU Corine land cover colors
101            curvature:   for   terrain   curvatures   (from   v.surf.rst   and
102           r.slope.aspect)
103            differences: differences oriented colors
104            elevation: maps relative ranges  of  raster  values  to  elevation
105           color ramp
106            etopo2: colors for ETOPO2 worldwide bathymetry/topography
107            evi: enhanced vegetative index colors
108            fahrenheit: blue to red for Fahrenheit temperature
109            gdd: accumulated growing degree days
110            grass: GRASS GIS green (perceptually uniform)
111            greens: white to green
112            grey: grey scale
113            grey.eq: histogram-equalized grey scale
114            grey.log: histogram logarithmic transformed grey scale
115            grey1.0: grey scale for raster values between 0.0-1.0
116            grey255: grey scale for raster values between 0-255
117            gyr: green through yellow to red
118            haxby: relative colors for bathymetry or topography
119            kelvin: blue to red for temperature in Kelvin scale
120            ndvi: Normalized Difference Vegetation Index colors
121            ndwi: Normalized Difference Water Index colors
122            oranges: white to orange
123            population:  color  table covering human population classification
124           breaks
125            population_dens: color table  covering  human  population  density
126           classification breaks
127            precipitation: precipitation color table (0..2000mm)
128            precipitation_daily: precipitation color table (0..1000mm)
129            precipitation_monthly: precipitation color table (0..1000mm)
130            rainbow: rainbow color table
131            ramp: color ramp
132            random: random color table
133            reds: white to red
134            roygbiv: no description
135            rstcurv: terrain curvature (from r.resamp.rst)
136            ryb: red through yellow to blue
137            ryg: red through yellow to green
138            sepia: yellowish-brown through to white
139            slope: r.slope.aspect-type slope colors for raster values 0-90
140            soilmoisture: soilmoisture color table (0.0-1.0)
141            srtm: color palette for Shuttle Radar Topography Mission elevation
142            srtm_plus: color palette for Shuttle Radar Topography Mission ele‐
143           vation (with seafloor colors)
144            terrain: global elevation color table covering -11000 to +8850m
145            viridis: perceptually uniform sequential color table viridis
146            water: water depth
147            wave: color wave
148
149       raster=name
150           Raster map from which to copy color table
151
152       raster_3d=name
153           3D raster map from which to copy color table
154
155       rules=name
156           Path to rules file
157
158       rgb_column=name
159           Name of color column to populate RGB values
160           If not given writes color table
161

DESCRIPTION

163       v.colors allows creating or modifying color  table  associated  with  a
164       vector map similarly to r.colors for raster maps.
165
166       Color  rules  are  built  from  features  category  values (use=cat) or
167       numeric data column (use=attr) defined by column option. For 3D  vector
168       maps  is  allowed  to  define  color rules based on points or centroids
169       z-coordinate (use=z). 3D vector lines are not supported.
170
171       The raster option allows user to specify a raster  map  from  which  to
172       copy the color table, similarly raster_3d option for 3D raster map.
173
174       The  rules  color  table  type  will cause v.colors to read color table
175       specifications from given file and will build the color  table  accord‐
176       ingly. See r.colors manual page for details.
177
178       If the user specifies the -w flag, the current color table file for the
179       input map will not be overwritten. This means that the color  table  is
180       created  only if the vector map does not already have a color table. If
181       this option is not specified, the color table will be  created  if  one
182       does not exist, or modified if it does.
183
184       Alternatively  the  color  rules  can  be  stored  in  a  string column
185       (rgb_column) by saving the RRR:GGG:BBB values  suitable  for  use  with
186       d.vect.
187

NOTES

189       For vector maps with a large number of features it’s more convenient to
190       store color rules in an attribute column (given by  rgb_column)  rather
191       then  in  a  color table file. Reading color tables with more then 1000
192       items is slow.
193

EXAMPLES

195   Define color table based on categories
196       Define color table wave based on categories from layer 1
197       v.colors map=soils_general layer=1 color=wave
198
199   Define color table based on attribute values
200       Define color table ryg based on  values  from  attribute  column  AREA.
201       Attribute table is linked to layer 1.
202       v.to.db map=soils_general layer=1 option=area column=AREA
203       v.colors map=soils_general layer=1 color=wave use=attr column=AREA
204
205   Define color table stored as RGB values in attribute table
206       Write  color values to the attribute table (column GRASSRGB) instead of
207       creating color table.
208       v.colors map=soils_general layer=1 color=wave use=attr column=AREA rgb_column=GRASSRGB
209       # See some GRASSRGB values:
210       v.db.select map=soils_general where="cat < 4"
211       cat|OBJECTID|AREA|PERIMETER|GSLNC250_|GSLNC250_I|GSL_NAME|GRASSRGB
212       1|1|0|164616.125|2|1|NC113|212:42:127
213       2|2|0|30785.529297|3|2|NC096|212:42:127
214       3|3|0|87572.882812|4|3|NC097|212:42:127
215
216   Convert RGB attribute values into color table
217       Convert existing RGB values to color table rules.
218       v.colors -c map=soils_general rgb_column=GRASSRGB
219       Note that in this case the vector map has a proper color table assigned
220       (check  by  v.colors.out) together with GRASSRGB attribute column. Also
221       note that color table is preferred over RGB values stored in  attribute
222       table.
223
224   Remove existing color table
225       Existing color table can be removed by -r flag.
226       v.colors -r map=soils_general
227       Before  removing  color  table you can store color rules to the file by
228       v.colors.out and later to assign by rules option.
229       v.colors.out map=soils_general rules=soils.colr
230       v.colors map=soils_general rules=soils.colr
231       To drop RGB column use v.db.dropcolumn.
232       v.db.dropcolumn map=soils_general column=GRASSRGB
233

SEE ALSO

235        d.vect, r.colors, r.colors.out, r3.colors, r3.colors.out, v.colors.out
236
237       See also wiki page Color tables (from GRASS User Wiki)
238
239       ColorBrewer is an online tool designed to help people select good color
240       schemes for maps and other graphics.
241

AUTHORS

243       Martin  Landa,  OSGeoREL,  Czech  Technical University in Prague, Czech
244       Republic
245
246       Last changed: $Date: 2015-02-13 16:14:07 +0100 (Fri, 13 Feb 2015) $
247

SOURCE CODE

249       Available at: v.colors source code (history)
250
251       Main index | Vector index | Topics index | Keywords index  |  Graphical
252       index | Full index
253
254       © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
255
256
257
258GRASS 7.4.4                                                        v.colors(1)
Impressum