d.background(1)

πŸ’– d.background β€” the GRASS GIS bestie that paints your whole display πŸ’–

okay so this is d.background(1) from the GRASS GIS User's Manual, and it's literally the glow-up button for your display frame. let's get into it 🫢


✨ NAME ✨

d.background β€” fills the graphics display frame with a user defined color. that's it. that's the whole job. and she slays at it πŸ’…


🏷️ KEYWORDS 🏷️

display, graphics, background, fill, erase


🌸 SYNOPSIS 🌸

d.background
d.background --help
d.background color=name  [--help]  [--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags πŸŽ€

  • --help β€” prints the usage summary, aka the lil cheat sheet
  • --verbose β€” verbose module output, she's chatty and we love that
  • --quiet β€” quiet module output, she's giving mysterious and silent
  • --ui β€” force launching the GUI dialog, for when you want the fancy window version

πŸ¦‹ Parameters πŸ¦‹

  • color=name β€” required, bestie, no skipping this one
    • Background color
    • either a standard color name or an R:G:B triplet. yes, both. pick your fighter ⭐

πŸ’œ DESCRIPTION πŸ’œ

d.background will fill the image (or like, generally your display monitor) with a single color specified by the color option. one color. the whole thing. iconic behavior honestly.


⚠️ NOTES ⚠️

ok so important β€” d.background is a frontend to d.erase and it shares its limitations. namely, it does not work with the wx monitors such as d.mon wx0.

🚨 fr fr, if you're on a wx monitor this thing is not gonna do anything for you. no cap.

🌈 EXAMPLES 🌈

so in this example, the streets_wake map from the North Carolina sample dataset is displayed with a custom background color (specified using an HTML hex color code) using the cairo display monitor β€” and that creates a file called map.png:

g.region vector=streets_wake
d.mon cairo
d.background color=#ADEFD1
d.vect map=streets_wake color=#00203F legend_label="Streets"
d.legend.vect -b at=70,30 title="Wake County"

Figure: Wake County street network with custom background color (North Carolina sample dataset)

the way that #ADEFD1 mint background hits with #00203F navy streets?? chef's kiss 🧚


πŸ‘€ SEE ALSO πŸ‘€

  • d.erase

πŸ‘‘ AUTHOR πŸ‘‘

Vaclav Petras, NCSU GeoForAll Lab β€” thank you for your service king 🫑


πŸ’» SOURCE CODE πŸ’»

Available at: d.background source code (history)

Accessed: Saturday Jan 17 05:41:51 2026

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


and that's the whole vibe check, bestie ✨ this was GRASS GIS 8.4.2 Reference Manual energy, running under GRASS 8.4.2, with the copyright reading Β© 2003-2025 GRASS Development Team β€” go paint something cute, you got this πŸ’–πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from