[GRASS-dev] Color tables/rules now use standardized color parsing
wenzeslaus at gmail.com
Wed Oct 19 15:20:17 PDT 2016
in r69708, I've changed the implementation of parsing color rules to use
the G_str_to_color() function instead of a custom mechanism. This, in
connection with r69683, adds the possibility to use HTML (CSS) style of
hexadecimal colors with leading hash.
So, now you can do:
r.colors elevation rules=- <<EOF
Where it gets little tricky is that hash is used to comment a line in color
rules/color table format. A comment is now implemented as a line where
first character is hash, so there is no interference. We just need to keep
it that way.
The comments (# ...) are actually not documented in r.colors manual. Same
goes also for the syntax with space as a separator instead of colon. Now we
also support ; and , as separators (because that's what G_str_to_color()
supports). The hash syntax keeps tradition and it is undocumented as well
for now (but there is a test!).
Specify color as #RRGGBB
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev