Open NishantBansal2003 opened 2 weeks ago
We should consider moving some of the common functionality with r.colors.out to library to avoid duplication.
Sure, I will create a PR since both r.colors.out
and v.colors.out
print colors in plain text using Rast_print_colors
.
We should consider moving some of the common functionality with r.colors.out to library to avoid duplication.
Hey @petrasovaa, should I move the common functionality to a library and add JSON output to v.colors.out
in a single PR or separate PRs?
We should consider moving some of the common functionality with r.colors.out to library to avoid duplication.
Hey @petrasovaa, should I move the common functionality to a library and add JSON output to
v.colors.out
in a single PR or separate PRs?
To answer this, you can think about if there would be a problem with the PR and it would need to be reverted, would it also remove some other new functionality? If so, it's probably because it would have been better to be in separate PRs.
Add JSON output for easy parsing of v.colors.out output.
Describe the solution you'd like Add an option for format, such as
format=plain
for the current output format andformat=json
for the JSON output. Additionally, include thecolor_format
option to specify the color format to be printed in JSON. The available options forcolor_format
includergb
,hex
,hsv
, andtriplet
.A possible JSON layout could be: