d.background(1grass)

πŸ’… d.background β€” the GRASS User's Manual, bestie edition

okay so you opened the manual for d.background (that's the 1grass one, GRASS User's Manual section, iykyk) and honestly? it's a little icon of a module. it does ONE thing and it does it fabulously: it paints your whole display frame whatever color you want. main character energy fr fr. 🌈

✨ KEYWORDS ✨

display, graphics, background, fill, erase

like… the whole vibe is right there in the keywords. no notes. πŸ‘‘


🌸 SYNOPSIS 🌸

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

πŸŽ€ Flags

  • --help β€” prints the usage summary, aka "what does this thing do again" but from the computer's own mouth
  • --verbose β€” verbose module output, for when you want the module to ✨ overshare ✨
  • --quiet β€” quiet module output, for when you want it to be mysterious and say nothing
  • --ui β€” force launching the GUI dialog, if clicking buttons is more your era

πŸ¦‹ Parameters

  • color=name [required] β€” the background color, bestie. you HAVE to give this one, it's not optional, it's giving mandatory.
    • either a standard color name or an R:G:B triplet

πŸ’– DESCRIPTION πŸ’–

so d.background fills the image (or like, generally, the display monitor) with a single color β€” the one you picked with the color option. that's it. that's the whole module. one color. all the pixels. slay. 🎨


πŸ’€ NOTES πŸ’€

okay important, no cap: d.background is a frontend to d.erase and it shares its limitations. namely β€” and this is the part where we hold hands 🫢 β€” it does not work with the wx monitors, like d.mon wx0. so don't come for it when it doesn't work there, that's just how it is.


πŸ”₯ EXAMPLES πŸ”₯

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 β€” which 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). it ate, honestly. πŸ’…


🌟 SEE ALSO 🌟

  • d.erase β€” the parent module, the original, the blueprint

🌈 AUTHOR 🌈

Vaclav Petras, NCSU GeoForAll Lab β€” thank you for your service πŸ«‘πŸ’œ


⭐ SOURCE CODE ⭐

available at: d.background source code (history)

latest change: Friday Feb 07 19:16:09 2025 in commit:

a82a39f673b97fafcfce1604dc3e6015cb96487a

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!! πŸŽ€ go forth and fill a frame with #ADEFD1 or whatever your heart desires. this has been GRASS 8.5.0, brought to you by the GRASS Development Team (Β© 2003-2026, iconic behavior, no notes). mwah. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from