This Python script applies a color scheme to an image by transforming its colors to match the selected theme. The color scheme are defined in a JSON file, 'color-scheme.json', which contains multiple themes with associated color palettes. The script then maps the original image colors to the closet colors from the selected theme using a KD-Tree for efficient color matching.
- The script load a set of color schemes from 'color-scheme.json' file.
- The user is prompted to select a theme from the available options.
- The selected color palette is applied to the image, changing its appearance.
- Enjoy ricing.
python main.py {your_image path}Here is an example of the original image and the three resulting images:
| Original Image | Nord | Gruvbox | Tokyo Night |
|---|---|---|---|
This scripts works better with simple images. If you put an imagen with a lot of details it may not work as expected.
This project is licensed under the MIT License.
To install the required dependencies, run the following command:
pip install -r requirements.txt