d.rgb(1grass)

πŸ’… d.rgb β€” the GRASS manual, but make it cute ✨

okay so bestie, welcome to the GRASS User's Manual page for d.rgb. yes it's a 1grass manual, and yes it's about to be your new fave πŸ’–


πŸŽ€ NAME πŸŽ€

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


🌈 KEYWORDS 🌈

display, graphics, raster, RGB β€” the four little vibes this tool is serving 🫢


✨ 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. no more see-through blanks, we're going full opacity, slay πŸŽ€
  • --help β€” print usage summary. when u need the tea β˜•
  • --verbose β€” verbose module output. it's giving talkative πŸ’¬
  • --quiet β€” quiet module output. it's giving mysterious 🀫
  • --ui β€” force launching GUI dialog. for when u want the clicky-clicky version πŸ–±οΈ

🧚 Parameters 🧚

  • red=name [required] β€” name of the raster map to be used for red ❀️
  • green=name [required] β€” name of the raster map to be used for green πŸ’š
  • blue=name [required] β€” name of the raster map to be used for blue πŸ’™

like... all three are required, bestie. no skipping. it's a trio, it's destiny, it's the friend group 🌸


πŸ’– DESCRIPTION πŸ’–

d.rgb displays three user-specified raster maps as red, green, and blue overlays in the active graphics frame. (yes this is the exact same sentence as the NAME section, the manpage is just very sure about itself and honestly? valid.)

RGB stands for red, green, and blue. d.rgb visually combines three raster maps to form a color image πŸ”₯ here's the mechanic: for each map, the corresponding component from the layer's color table gets used β€” like, for the red layer, the red component is used, and so on, etcetera, iykyk. and in general? the input raster maps should be using a grey-scale color table. lowkey important. highkey aesthetic πŸŽ€


πŸ“ NOTES πŸ“

okay real talk, listen up:

d.rgb does not attempt to quantize the combined image into a fixed number of colors. nor does it have an option to generate a composite layer β€” if that's what u want, go see r.composite for that, bestie, different tool, different vibe.

⚠️ the image and raster maps will not display properly if the graphics device does not have a reasonable sampling of the RGB color-space. periodt. no cap.

if the color quality of satellite image color composites seems to appear poor, run i.colors.enhance on the selected satellite channels. fix it, glow it up, slay ✨

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

and 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):

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) πŸ“ΈπŸ›°οΈ


πŸ‘€ SEE ALSO πŸ‘€

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

(the whole squad, go say hi 🫢)


πŸ‘‘ AUTHOR πŸ‘‘

Glynn Clements β€” icon, legend, the moment πŸ’œ


πŸ”— SOURCE CODE πŸ”—

Available at: d.rgb source code (history)

Latest change: Thursday May 08 14:17:52 2025 in commit: 3caa352f78f86a51ca463a6f1ba7ffe3db9771df

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

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page bestie πŸŽ€ this was GRASS 8.5.0, the d.rgb manual, coming to u straight from the <pink>GRASS User's Manual` β€” mwah, go make some stunning RGB composites, ur gonna do amazing πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from