This repository contains a Python script that can convert json files containing colorbar configurations for maps to custom sized PNG files.
To run this script, you need to have the following installed on your system:
- Python 3 (preferably the latest version)
- Clone this repository to your local machine.
- CD into the repository folder.
- Create the virtual environment with the command:
python3 -m venv venv
. - Activate the virtual environment with the command
source venv/bin/activate
(Mac/Linux) orvenv\Scripts\activate
(Windows). - Install the required Python packages using the following command in your terminal:
pip install -r requirements.txt
.
- Place any JSON files containing colorbar configurations that you want to convert in the
palettes-custom
directory. This directory currently has 27 color palette configurations from NASA Worldview. These can be removed. - Run the script using the following command in your terminal:
python colorbar-script.py
. - The PNG images will generate inside of the
palettes-custom
directory.