.TH v.colors 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBv.colors\fR\fR \- Creates/modifies the color table associated with a vector map. .SH KEYWORDS vector, color table .SH SYNOPSIS \fBv.colors\fR .br \fBv.colors \-\-help\fR .br \fBv.colors\fR [\-\fBrwldngac\fR] \fBmap\fR=\fIname\fR [\fBlayer\fR=\fIstring\fR] \fBuse\fR=\fIstring\fR [\fBcolumn\fR=\fIname\fR] [\fBrange\fR=\fImin,max\fR] [\fBcolor\fR=\fIstyle\fR] [\fBraster\fR=\fIname\fR] [\fBraster_3d\fR=\fIname\fR] [\fBrules\fR=\fIname\fR] [\fBrgb_column\fR=\fIname\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-r\fR" 4m .br Remove existing color table .IP "\fB\-w\fR" 4m .br Only write new color table if it does not already exist .IP "\fB\-l\fR" 4m .br List available rules then exit .IP "\fB\-d\fR" 4m .br List available rules with description then exit .br If a color rule is given, only this rule is listed .IP "\fB\-n\fR" 4m .br Invert colors .IP "\fB\-g\fR" 4m .br Logarithmic scaling .IP "\fB\-a\fR" 4m .br Logarithmic\-absolute scaling .IP "\fB\-c\fR" 4m .br Convert color rules from RGB values to color table .br Option \(cqrgb_column\(cq with valid RGB values required .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBmap\fR=\fIname\fR \fB[required]\fR" 4m .br Name of vector map .br Or data source for direct OGR access .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number or name .br Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. .br Default: \fI1\fR .IP "\fBuse\fR=\fIstring\fR \fB[required]\fR" 4m .br Source values .br Options: \fIattr, cat, z\fR .br Default: \fIcat\fR .br \fBattr\fR: read values from attribute table (requires option) .br \fBcat\fR: use category values .br \fBz\fR: use z coordinate (3D points or centroids only) .IP "\fBcolumn\fR=\fIname\fR" 4m .br Name of column containing numeric data .br Required for use=attr .IP "\fBrange\fR=\fImin,max\fR" 4m .br Manually set range (refers to \(cqcolumn\(cq option) .br Ignored when \(cqrules\(cq given .IP "\fBcolor\fR=\fIstyle\fR" 4m .br Name of color table .br Options: \fIaspect, aspectcolr, bcyr, bgyr, blues, byg, byr, celsius, corine, curvature, differences, elevation, etopo2, evi, fahrenheit, forest_cover, gdd, grass, greens, grey, grey.eq, grey.log, grey1.0, grey255, gyr, haxby, inferno, kelvin, magma, ndvi, ndwi, nlcd, oranges, plasma, population, population_dens, precipitation, precipitation_daily, precipitation_monthly, rainbow, ramp, random, reds, roygbiv, rstcurv, ryb, ryg, sepia, slope, soilmoisture, srtm, srtm_plus, terrain, viridis, water, wave\fR .br \fB aspect\fR: aspect oriented grey colors [range: map values] .br \fB aspectcolr\fR: aspect oriented rainbow colors [range: 0 to 360] .br \fB bcyr\fR: blue through cyan through yellow to red [range: map values] .br \fB bgyr\fR: blue through green through yellow to red [range: map values] .br \fB blues\fR: white to blue [range: map values] .br \fB byg\fR: blue through yellow to green [range: map values] .br \fB byr\fR: blue through yellow to red [range: map values] .br \fB celsius\fR: blue to red for degree Celsius temperature [range: \-80 to 80] .br \fB corine\fR: EU Corine land cover colors [range: 111 to 995] .br \fB curvature\fR: for terrain curvatures (from v.surf.rst and r.slope.aspect) [range: map values] .br \fB differences\fR: differences oriented colors [range: map values] .br \fB elevation\fR: maps relative ranges of raster values to elevation color ramp [range: map values] .br \fB etopo2\fR: colors for ETOPO2 worldwide bathymetry/topography [range: \-11000 to 8850] .br \fB evi\fR: enhanced vegetative index colors [range: \-1 to 1] .br \fB fahrenheit\fR: blue to red for Fahrenheit temperature [range: \-112 to 176] .br \fB forest_cover\fR: percentage of forest cover [range: 0 to 100] .br \fB gdd\fR: accumulated growing degree days [range: 0 to 6000] .br \fB grass\fR: GRASS GIS green (perceptually uniform) [range: map values] .br \fB greens\fR: white to green [range: map values] .br \fB grey\fR: grey scale [range: map values] .br \fB grey.eq\fR: histogram\-equalized grey scale [range: map values] .br \fB grey.log\fR: histogram logarithmic transformed grey scale [range: map values] .br \fB grey1.0\fR: grey scale for raster values between 0.0\-1.0 [range: 0 to 1] .br \fB grey255\fR: grey scale for raster values between 0\-255 [range: 0 to 255] .br \fB gyr\fR: green through yellow to red [range: map values] .br \fB haxby\fR: relative colors for bathymetry or topography [range: map values] .br \fB inferno\fR: perceptually uniform sequential color table inferno [range: map values] .br \fB kelvin\fR: blue to red for temperature in Kelvin scale [range: 193.15 to 353.15] .br \fB magma\fR: perceptually uniform sequential color table magma [range: map values] .br \fB ndvi\fR: Normalized Difference Vegetation Index colors [range: \-1 to 1] .br \fB ndwi\fR: Normalized Difference Water Index colors [range: \-200 to 200] .br \fB nlcd\fR: US National Land Cover Dataset colors [range: 0 to 95] .br \fB oranges\fR: white to orange [range: map values] .br \fB plasma\fR: perceptually uniform sequential color table plasma [range: map values] .br \fB population\fR: color table covering human population classification breaks [range: 0 to 2e+09] .br \fB population_dens\fR: color table covering human population density classification breaks [range: 0 to 1e+09] .br \fB precipitation\fR: precipitation color table (0..2000mm) [range: 0 to 7000] .br \fB precipitation_daily\fR: precipitation color table (0..1000mm) [range: 0 to 10000] .br \fB precipitation_monthly\fR: precipitation color table (0..1000mm) [range: 0 to 1000] .br \fB rainbow\fR: rainbow color table [range: map values] .br \fB ramp\fR: color ramp [range: map values] .br \fB random\fR: random color table [range: map values] .br \fB reds\fR: white to red [range: map values] .br \fB roygbiv\fR: [range: map values] .br \fB rstcurv\fR: terrain curvature (from r.resamp.rst) [range: map values] .br \fB ryb\fR: red through yellow to blue [range: map values] .br \fB ryg\fR: red through yellow to green [range: map values] .br \fB sepia\fR: yellowish\-brown through to white [range: map values] .br \fB slope\fR: r.slope.aspect\-type slope colors for raster values 0\-90 [range: 0 to 90] .br \fB soilmoisture\fR: soilmoisture color table (0.0\-1.0) [range: 0 to 1] .br \fB srtm\fR: color palette for Shuttle Radar Topography Mission elevation [range: \-11000 to 8850] .br \fB srtm_plus\fR: color palette for Shuttle Radar Topography Mission elevation (with seafloor colors) [range: \-11000 to 8850] .br \fB terrain\fR: global elevation color table covering \-11000 to +8850m [range: \-11000 to 8850] .br \fB viridis\fR: perceptually uniform sequential color table viridis [range: map values] .br \fB water\fR: water depth [range: map values] .br \fB wave\fR: color wave [range: map values] .IP "\fBraster\fR=\fIname\fR" 4m .br Raster map from which to copy color table .IP "\fBraster_3d\fR=\fIname\fR" 4m .br 3D raster map from which to copy color table .IP "\fBrules\fR=\fIname\fR" 4m .br Path to rules file .IP "\fBrgb_column\fR=\fIname\fR" 4m .br Name of color column to populate RGB values .br If not given writes color table .SH DESCRIPTION \fIv.colors\fR allows creating or modifying color table associated with a vector map similarly to \fIr.colors\fR for raster maps. .PP Color rules are built from features category values (\fBuse=cat\fR) or numeric data column (\fBuse=attr\fR) defined by \fBcolumn\fR option. For 3D vector maps is allowed to define color rules based on points or centroids z\-coordinate (\fBuse=z\fR). 3D vector lines are not supported. .PP The \fBraster\fR option allows user to specify a raster map from which to copy the color table, similarly \fBraster_3d\fR option for 3D raster map. .PP The \fBrules\fR color table type will cause \fIv.colors\fR to read color table specifications from given file and will build the color table accordingly. See \fIr.colors\fR manual page for details. .PP If the user specifies the \fB\-w\fR flag, the current color table file for the input map will not be overwritten. This means that the color table is created only if the vector map does not already have a color table. If this option is not specified, the color table will be created if one does not exist, or modified if it does. .PP Alternatively the color rules can be stored in a string column (\fBrgb_column\fR) by saving the RRR:GGG:BBB values suitable for use with \fId.vect\fR. .SH NOTES For vector maps with a large number of features it\(cqs more convenient to store color rules in an attribute column (given by \fBrgb_column\fR) rather then in a color table file. Reading color tables with more then 1000 items is slow. .SH EXAMPLES .SS Define color table based on categories Define color table wave based on categories from layer 1 .br .nf \fC v.colors map=soils_general layer=1 color=wave \fR .fi .SS Define color table based on attribute values Define color table ryg based on values from attribute column AREA. Attribute table is linked to layer 1. .br .nf \fC v.to.db map=soils_general layer=1 option=area column=AREA v.colors map=soils_general layer=1 color=wave use=attr column=AREA \fR .fi .SS Define color table stored as RGB values in attribute table Write color values to the attribute table (column GRASSRGB) instead of creating color table. .br .nf \fC v.colors map=soils_general layer=1 color=wave use=attr column=AREA rgb_column=GRASSRGB # See some GRASSRGB values: v.db.select map=soils_general where=\(dqcat < 4\(dq cat|OBJECTID|AREA|PERIMETER|GSLNC250_|GSLNC250_I|GSL_NAME|GRASSRGB 1|1|0|164616.125|2|1|NC113|212:42:127 2|2|0|30785.529297|3|2|NC096|212:42:127 3|3|0|87572.882812|4|3|NC097|212:42:127 \fR .fi .SS Convert RGB attribute values into color table Convert existing RGB values to color table rules. .br .nf \fC v.colors \-c map=soils_general rgb_column=GRASSRGB \fR .fi Note that in this case the vector map has a proper color table assigned (check by \fIv.colors.out\fR) together with GRASSRGB attribute column. Also note that color table is preferred over RGB values stored in attribute table. .SS Remove existing color table .PP Existing color table can be removed by \fB\-r\fR flag. .br .nf \fC v.colors \-r map=soils_general \fR .fi Before removing color table you can store color rules to the file by \fIv.colors.out\fR and later to assign by \fBrules\fR option. .br .nf \fC v.colors.out map=soils_general rules=soils.colr v.colors map=soils_general rules=soils.colr \fR .fi To drop RGB column use \fIv.db.dropcolumn\fR. .br .nf \fC v.db.dropcolumn map=soils_general column=GRASSRGB \fR .fi .SH SEE ALSO \fI d.vect, r.colors, r.colors.out, r3.colors, r3.colors.out, v.colors.out \fR .PP See also wiki page Color tables (from GRASS User Wiki) .PP ColorBrewer is an online tool designed to help people select good color schemes for maps and other graphics. .SH AUTHORS Martin Landa, OSGeoREL, Czech Technical University in Prague, Czech Republic .SH SOURCE CODE .PP Available at: v.colors source code (history) .PP Main index | Vector index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual