[GRASS-dev] Specify color as #RRGGBB
wenzeslaus at gmail.com
Thu Oct 6 16:58:58 PDT 2016
in r69683 I've added few lines to support colors hexadecimal numbers for
colors when prefixed by hash. That's the syntax often used in HTML (CSS)
and by other programs and formats.
Now instead of
d.vect map=hospitals color=80:170:255
you can do this:
d.vect map=hospitals color=#50AAFF
which is useful when you are copy pasting colors from somewhere (like the
The limit is that it works only for the places where G_str_to_color() is
used. Most notably it doesn't work in r.colors' rules file.
This can help with writing scripts but be aware that # starts a comment in
Bash, so use quotes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev