d.rgb(1)

πŸ’– d.rgb β€” the glow-up your raster maps deserve πŸ’–

okay bestie, listen. this is d.rgb(1), a GRASS GIS User's Manual page, and it's literally about painting three raster maps on top of each other in red, green and blue like you're mixing eyeshadow palettes except the palette is satellite imagery. slay.


✨ NAME ✨

d.rgb β€” displays three user-specified raster maps as red, green, and blue overlays in the active graphics frame. no cap, that's the whole job.


🏷️ KEYWORDS 🏷️

display, graphics, raster, RGB πŸŽ€


🌈 SYNOPSIS 🌈

d.rgb
d.rgb --help
d.rgb [-n] red=name green=name blue=name  [--help]  [--verbose]
[--quiet]  [--ui]

🚩 Flags 🚩

  • -n β€” make null cells opaque. like, no see-through moments, nulls get the solid treatment 🫢
  • --help β€” print usage summary
  • --verbose β€” verbose module output
  • --quiet β€” quiet module output
  • --ui β€” force launching GUI dialog

πŸŽ›οΈ Parameters πŸŽ›οΈ

  • red=name [required] β€” name of raster map to be used for
  • green=name [required] β€” name of raster map to be used for
  • blue=name [required] β€” name of raster map to be used for
all three are required, bestie. you can't just show up with one channel and expect a color. that's not how RGB works, i don't make the rules πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

d.rgb displays three user-specified raster maps as red, green, and blue overlays in the active graphics frame. it's giving main character energy for your map display.

RGB stands for red, green, and blue (iykyk). d.rgb visually combines three raster maps to form a color image. for each map, the corresponding component from the layer's color table is used β€” so for the red layer, the red component is used, and so on and so forth. in general, the input raster maps should use a grey-scale color table. grey-scale is the vibe check here, fr fr.


πŸ“ NOTES πŸ“

okay so here's the tea: d.rgb does not attempt to quantize the combined image into a fixed number of colors. it also doesn't have an option to generate a composite layer β€” see r.composite for that. don't ask it to do something it's not built for, it's not that kind of module.

⚠️ the image and raster maps will not display properly if the graphics device does not have a reasonable sampling of the RGB color-space. like, it'll look a mess. be warned. πŸ’€

if the color quality of satellite image color composites seems to appear poor, run i.colors.enhance on the selected satellite channels. that's the fix, go do it. ✨

an alternative is the assignment of grey color tables to each band with r.colors:

r.info -r image.1
min=0
max=255
r.colors map=image.1 color=grey
r.colors map=image.2 rast=image.1
r.colors map=image.3 rast=image.1

to write out the color composite to a combined R/G/B raster maps, use r.composite. πŸŽ€


🌸 EXAMPLE 🌸

visual color composite of a LANDSAT scene (North Carolina sample dataset) β€” obsessed, honestly:

g.region raster=lsat7_2002_10 -p
d.rgb blue=lsat7_2002_10 green=lsat7_2002_20 red=lsat7_2002_30

Figure: Visual color composite of a LANDSAT scene (North Carolina sample dataset). it ate. πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€

d.colortable, d.his, r.blend, r.mapcalc, r.colors, r.composite


πŸ‘‘ AUTHOR πŸ‘‘

Glynn Clements


🧚 SOURCE CODE 🧚

Available at: d.rgb source code (history)

Accessed: Saturday Jan 17 05:40:37 2026

Main index | Display index | Topics index | Keywords index | Graphical index | Full index


Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual

and that's the whole page bestie β€” this was d.rgb(1) from the GRASS 8.4.2 manual, mwah πŸ’– bye, go make something gorgeous πŸ¦‹

πŸ“¦ where this page comes from