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 (see r.color help). the whole palette situationship is below πŸ‘‡
  • raster=name β€” raster map from which to copy color table
  • raster_3d=name β€” 3D raster map from which to copy color table
  • rules=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 values
  • aspectcolr β€” aspect oriented rainbow colors Β· range: 0 to 360
  • bcyr β€” blue through cyan through yellow to red Β· range: map values
  • bgyr β€” blue through green through yellow to red Β· range: map values
  • blues β€” white to blue Β· range: map values
  • byg β€” blue through yellow to green Β· range: map values
  • byr β€” blue through yellow to red Β· range: map values
  • celsius β€” blue to red for degree Celsius temperature Β· range: -80 to 80
  • corine β€” EU Corine land cover colors Β· range: 111 to 995
  • curvature β€” for terrain curvatures (from v.surf.rst and r.slope.aspect) Β· range: map values
  • differences β€” differences oriented colors Β· range: map values
  • elevation β€” maps relative ranges of raster values to elevation color ramp Β· range: map values
  • etopo2 β€” colors for ETOPO2 worldwide bathymetry/topography Β· range: -11000 to 8850
  • evi β€” enhanced vegetative index colors Β· range: -1 to 1
  • fahrenheit β€” blue to red for Fahrenheit temperature Β· range: -112 to 176
  • forest_cover β€” percentage of forest cover Β· range: 0 to 100
  • gdd β€” accumulated growing degree days Β· range: 0 to 6000
  • grass β€” GRASS green (perceptually uniform) Β· range: map values
  • greens β€” white to green Β· range: map values
  • grey β€” grey scale Β· range: map values
  • grey.eq β€” histogram-equalized grey scale Β· range: map values
  • grey.log β€” histogram logarithmic transformed grey scale Β· range: map values
  • grey1.0 β€” grey scale for raster values between 0.0-1.0 Β· range: 0 to 1
  • grey255 β€” grey scale for raster values between 0-255 Β· range: 0 to 255
  • gyr β€” green through yellow to red Β· range: map values
  • haxby β€” relative colors for bathymetry or topography Β· range: map values
  • inferno β€” perceptually uniform sequential color table inferno Β· range: map values
  • kelvin β€” blue to red for temperature in Kelvin scale Β· range: 193.15 to 353.15
  • magma β€” perceptually uniform sequential color table magma Β· range: map values
  • ndvi β€” Normalized Difference Vegetation Index colors Β· range: -1 to 1
  • ndwi β€” Normalized Difference Water Index colors Β· range: -200 to 200
  • nlcd β€” US National Land Cover Dataset colors Β· range: 0 to 95
  • oranges β€” white to orange Β· range: map values
  • plasma β€” perceptually uniform sequential color table plasma Β· range: map values
  • population β€” color table covering human population classification breaks Β· range: 0 to 2e+09
  • population_dens β€” color table covering human population density classification breaks Β· range: 0 to 1e+09
  • precipitation β€” precipitation color table (0..2000mm) Β· range: 0 to 7000
  • precipitation_daily β€” precipitation color table (0..1000mm) Β· range: 0 to 10000
  • precipitation_monthly β€” precipitation color table (0..1000mm) Β· range: 0 to 1000
  • rainbow β€” rainbow color table Β· range: map values
  • ramp β€” color ramp Β· range: map values
  • random β€” random color table Β· range: map values
  • reds β€” white to red Β· range: map values
  • roygbiv β€” (no description given, she's mysterious) Β· range: map values
  • rstcurv β€” terrain curvature (from r.resamp.rst) Β· range: map values
  • ryb β€” red through yellow to blue Β· range: map values
  • ryg β€” red through yellow to green Β· range: map values
  • sepia β€” yellowish-brown through to white Β· range: map values
  • slope β€” r.slope.aspect-type slope colors for raster values 0-90 Β· range: 0 to 90
  • soilmoisture β€” soilmoisture color table (0.0-1.0) Β· range: 0 to 1
  • srtm β€” color palette for Shuttle Radar Topography Mission elevation Β· range: -11000 to 8850
  • srtm_percent β€” color palette for Shuttle Radar Topography Mission using relative elevation Β· range: map values
  • srtm_plus β€” color palette for Shuttle Radar Topography Mission elevation (with seafloor colors) Β· range: -11000 to 8850
  • terrain β€” global elevation color table covering -11000 to +8850m Β· range: -11000 to 8850
  • viridis β€” perceptually uniform sequential color table viridis Β· range: map values
  • water β€” water depth Β· range: map values
  • wave β€” 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