Skip to content

Converts THREDDS palettes from V4 format (RGB), to V5 format (hex)

License

Notifications You must be signed in to change notification settings

billyz313/magic-palette-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Magic Palette Converter for THREDDS 5.x

Python: 3.9 License: MIT

This script is used primarily for converting palette files from RGB values to hex values. In THREDDS V4.8 and below the palettes were defined by either RGB values or RGB percentages. In THREDDS V5.x they require the palettes to be hex values. To make the conversion an easier process I have created the Magic Palette Converter for THREDDS.

Use

  • Clone the script
  • run the script

Quick note before running the script

This script will overwrite existing palettes which usually is the desired outcome due to naming. If you would like to preserve the original palettes you can pass -o False and new palettes will be created with the prefix hex_

When running, pass -path with the full system path to your palettes. Relative paths from the python file usually work, but full paths always work.

python magic_palette_converter.py -path PATH_TO_YOUR_PALETTES

If there were any palette files that could not be converted they will be noted in the console. This could happen if there are unusual lines of text in the files. If you find a case where this happens, please create an issue.

Contact

Authors

License and Distribution

Magic Palette Converter for THREDDS is distributed by Billy Ashmall under the terms of the MIT License. See LICENSE in this directory for more information.

Privacy & Terms of Use

Magic Palette Converter for THREDDS in no way collects or uses any personal information. This is completely open source software (OSS), you are free to use this software as you find it useful to your tasks.
Feel free to modify, update, and submit a pull request.

About

Converts THREDDS palettes from V4 format (RGB), to V5 format (hex)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages