t.rast.colors(1grass)
π t.rast.colors β the glow-up your color tables have been waiting for π
the manual name is t.rast.colors(1grass), from the GRASS User's Manual, and ok bestie, this one is a whole vibe: it builds a color table for every registered map in a space time raster dataset and assigns it to each one. no cap.
π NAME π
t.rast.colors β creates/modifies the color table associated with each raster map of the space time raster dataset. it's giving aesthetic overhaul for your temporal data β¨
π KEYWORDS π
temporal, color table, raster, time
π₯ SYNOPSIS π₯
t.rast.colors
t.rast.colors --help
t.rast.colors [-rwlngae] input=name [color=style] [raster=name]
[raster_3d=name] [rules=name] [--help] [--verbose] [--quiet]
[--ui]
β¨ Flags β¨
-rβ remove existing color table. bye bye old palette π-wβ only write new color table if it does not already exist. like, if the fit is already there, we don't touch it π-lβ list available rules then exit. window shopping, then dipping ποΈ-nβ invert colors. uno reverse card π-gβ logarithmic scaling π-aβ logarithmic-absolute scaling π-eβ histogram equalization. balance, but for your histogram βοΈ--helpβ print usage summary--verboseβ verbose module output (she yaps π¬)--quietβ quiet module output (she's silent, mysterious π«₯)--uiβ force launching GUI dialog
πΈ Parameters πΈ
input=name[required] β name of the input space time raster dataset. yes bestie, this one is mandatory fr fr.color=styleβ name of color table (seer.colorhelp). the whole palette situationship is below πraster=nameβ raster map from which to copy color tableraster_3d=nameβ 3D raster map from which to copy color tablerules=nameβ path to rules file
π color=style β the full menu of icons π
every single one of these is available, and each comes with its own range, so let's go:
aspectβ aspect oriented grey colors Β· range: map valuesaspectcolrβ aspect oriented rainbow colors Β· range: 0 to 360bcyrβ blue through cyan through yellow to red Β· range: map valuesbgyrβ blue through green through yellow to red Β· range: map valuesbluesβ white to blue Β· range: map valuesbygβ blue through yellow to green Β· range: map valuesbyrβ blue through yellow to red Β· range: map valuescelsiusβ blue to red for degree Celsius temperature Β· range: -80 to 80corineβ EU Corine land cover colors Β· range: 111 to 995curvatureβ for terrain curvatures (fromv.surf.rstandr.slope.aspect) Β· range: map valuesdifferencesβ differences oriented colors Β· range: map valueselevationβ maps relative ranges of raster values to elevation color ramp Β· range: map valuesetopo2β colors for ETOPO2 worldwide bathymetry/topography Β· range: -11000 to 8850eviβ enhanced vegetative index colors Β· range: -1 to 1fahrenheitβ blue to red for Fahrenheit temperature Β· range: -112 to 176forest_coverβ percentage of forest cover Β· range: 0 to 100gddβ accumulated growing degree days Β· range: 0 to 6000grassβ GRASS green (perceptually uniform) Β· range: map valuesgreensβ white to green Β· range: map valuesgreyβ grey scale Β· range: map valuesgrey.eqβ histogram-equalized grey scale Β· range: map valuesgrey.logβ histogram logarithmic transformed grey scale Β· range: map valuesgrey1.0β grey scale for raster values between 0.0-1.0 Β· range: 0 to 1grey255β grey scale for raster values between 0-255 Β· range: 0 to 255gyrβ green through yellow to red Β· range: map valueshaxbyβ relative colors for bathymetry or topography Β· range: map valuesinfernoβ perceptually uniform sequential color table inferno Β· range: map valueskelvinβ blue to red for temperature in Kelvin scale Β· range: 193.15 to 353.15magmaβ perceptually uniform sequential color table magma Β· range: map valuesndviβ Normalized Difference Vegetation Index colors Β· range: -1 to 1ndwiβ Normalized Difference Water Index colors Β· range: -200 to 200nlcdβ US National Land Cover Dataset colors Β· range: 0 to 95orangesβ white to orange Β· range: map valuesplasmaβ perceptually uniform sequential color table plasma Β· range: map valuespopulationβ color table covering human population classification breaks Β· range: 0 to 2e+09population_densβ color table covering human population density classification breaks Β· range: 0 to 1e+09precipitationβ precipitation color table (0..2000mm) Β· range: 0 to 7000precipitation_dailyβ precipitation color table (0..1000mm) Β· range: 0 to 10000precipitation_monthlyβ precipitation color table (0..1000mm) Β· range: 0 to 1000rainbowβ rainbow color table Β· range: map valuesrampβ color ramp Β· range: map valuesrandomβ random color table Β· range: map valuesredsβ white to red Β· range: map valuesroygbivβ (no description given, she's mysterious) Β· range: map valuesrstcurvβ terrain curvature (fromr.resamp.rst) Β· range: map valuesrybβ red through yellow to blue Β· range: map valuesrygβ red through yellow to green Β· range: map valuessepiaβ yellowish-brown through to white Β· range: map valuesslopeβr.slope.aspect-type slope colors for raster values 0-90 Β· range: 0 to 90soilmoistureβ soilmoisture color table (0.0-1.0) Β· range: 0 to 1srtmβ color palette for Shuttle Radar Topography Mission elevation Β· range: -11000 to 8850srtm_percentβ color palette for Shuttle Radar Topography Mission using relative elevation Β· range: map valuessrtm_plusβ color palette for Shuttle Radar Topography Mission elevation (with seafloor colors) Β· range: -11000 to 8850terrainβ global elevation color table covering -11000 to +8850m Β· range: -11000 to 8850viridisβ perceptually uniform sequential color table viridis Β· range: map valueswaterβ water depth Β· range: map valueswaveβ color wave Β· range: map values
π¦ DESCRIPTION π¦
ok so here's the tea, bestie π΅ t.rast.colors computes a color table based on all registered maps of a space time raster dataset, and then assigns that color table to each map. so the color table it makes reflects the data range of the whole space time raster dataset. iconic behavior, honestly π
this module is a simple wrapper around r.colors. all options of r.colors are supported. internally a file with map names is created and passed to the file option of r.colors. sneaky? a little. effective? absolutely π
go take a peek at the r.colors manual page for further information, she's the OG
π EXAMPLE π
set the Celsius color table on a monthly dataset, as one does:
t.rast.colors input=tempmean_monthly color=celsius
r.colors.out map=2009_01_tempmean
-80 0:0:40
-40 91:10:168
-30 220:220:220
-25 91:50:128
-20 50:0:150
-15 4:25:130
-10 8:54:106
-8 4:20:150
-5 0:50:255
-2 8:10:118
-0.061449 8:113:155
0.013855 8:118:157
0.090594 8:123:158
0.168767 8:128:159
0.248375 8:133:159
0.329417 8:136:160
...
40.6976 183:163:163
41.0483 185:167:167
41.4004 188:170:171
41.754 190:174:174
42.109 191:178:178
42.4655 193:182:182
42.8233 195:185:185
43.1827 197:189:189
43.5434 199:192:193
43.9056 200:197:197
44.2692 202:200:201
44.6342 204:204:204
45.0007 206:206:206
80 155:10:155
nv 255:255:255
default 255:255:255
look at those RGB triples. chef's kiss πβ¨
π SEE ALSO π
r.colors
π«Ά AUTHOR π«Ά
SΓΆren Gebbert, ThΓΌnen Institute of Climate-Smart Agriculture
π SOURCE CODE π
available at: t.rast.colors source code (history) π§
latest change: Monday Nov 03 07:16:48 2025, in commit c96796774942e46bbababcd652d3986d4e295665
Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie π this was t.rast.colors from GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β last touched Monday Nov 03 07:16:48 2025. go make something pretty, and remember: a dataset without a color table is just a numbers girlie with no aesthetic. slay responsibly π
πβ
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms