Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import functionality for act and cbt color swatches? #15

Open
brorfred opened this issue Sep 7, 2015 · 2 comments
Open

Add import functionality for act and cbt color swatches? #15

brorfred opened this issue Sep 7, 2015 · 2 comments

Comments

@brorfred
Copy link

brorfred commented Sep 7, 2015

Hi!

I have some code to import color swatches from NCAR and NASA in the cbt and act formats. Would you be interested if I submitted this as a pull request? It seems like the functionality would fit better as an io module in palettable than a separate project...

@jiffyclub
Copy link
Owner

I'd be interested to see it for sure! Can you give a little background about the cbt and act formats, where those come up, where you find them, etc?

@awarnock3
Copy link

I've been pulling palettes for scientific applications from the IDL language into a Python application for some NASA satellite imagery. Rather than importing families of palettes, it would be most convenient to just have a general import function from some simple external formats (say, comma-delimited). Generally, I export these from IDL as (r,g,b) tuple and convert them to YAML for my own applications. I'd love to replace my custom YAML with a package like Palettable if there were an easy way to import general palettes.

BTW, I've run into a need for multiple varieties of these - simple (r,g,b) tuples, or (r,g,b,a) tuples with transparency values, and (n,r,g,b) tuples with index values (so, not necessarily sorted on index value n). There are obvious extensions. In addition to those, we also have an internal XML format that provides the palette values with separate values for background, missing data, and out-of-range values (both above and below the desired data range).

Just FYI, I've ended up using matplotlib ListedColormap most frequently since our palettes seem to be discrete rather than continuous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants