NOAA-PMEL / PyFerret

The PyFerret program and Python module from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
60 stars 22 forks source link

Define a color from its html coding (hexa format) #40

Open PBrockmann opened 7 years ago

PBrockmann commented 7 years ago

ppl color n, R, G, B, A is the way proposed to define a new color.

But R, G, B are coded in percent and I haven't found any site that propose this format from a color picker application. See:

The HTML code (hexa coding with 6 letters) is more widely used. So I am wondering if pyferret could add a new command to define a color, something like:

define color 6 #99d8c9

karlmsmith commented 7 years ago

Sounds very reasonable

PBrockmann commented 7 years ago

Cool. Not so important issue but many users want to have a simple control on the colors used in their plot. Thanks

Also wondering if a gray could be added in addition to the classic ones (Black,Red,Green,Blue,LightBlue,Purple, and White). I have to define it each time that I draw graticules with a /grat=(dash, color=20)

yes? plot/grat=(dash, color=gray) i[i=1:10]
 **ERROR: invalid command: COLOR=GRAY
          Colors are Black,Red,Green,Blue,LightBlue,Purple, and White