Conversation
This PR adds new directive x to tell makecpt and grd2cpt to write their r/g/b triplets in hex format #rrggbb. Closes #7018.
|
makecpt seems to work fine. |
|
On a side note, sorry, why wasting loops converting some colors to color names? IMO it doesn't even increase readability as I don't know, for example, what a |
|
I think there is -Fr for that situation (no names) but for gray it gives
So we need to let that mean just shade if CPT is gray shades only. |
|
Not relevant, but I just discovered that the gmt color names are the same as those in |
|
Hi @anbj, thanks for the check. I found an unrelated bug in grd2cpt that would have affected any -F? argument. Now it works I think. |
|
@joa-quim, do we know if hex is used for gray shades with just two chars? E.g., |
|
yes, they are based on the X11 table. |
|
grd2cpt looks good now! |
Don't know but in that site I pointed (https://hexwords.netlify.app/) many colors have only 3 chars, so if less than 6 something is assumed. |
|
OK, I dont think we will go there but I am guessing 2-chars would be a gray shade and 3 would be r/g/b with the high text char. So undefined. |
|
Need approval on this one. |
|
Thanks Paul! |
|
Ping @joa-quim in case he needs to know that gmt_enum_dict.h changed? |
|
Changing enums should not matter for the Julia FFI |
This PR adds new directive -Fx to tell makecpt and grd2cpt to write their r/g/b triplets in hex format
#rrggbb. Closes #7018.@anbj, please give it a test or two.