A python script to convert images to your favorite color schemes. Some nice wallpapers created with this tool are in wallpapers/.
This script utilizes the python library Pillow for image processing. Make sure the packages below are installed.
- Python
- Pillow
Clone the repository with
git clone https://github.com/kyokazuki/ImageToPalette
and make the script executable with
chmod +x convert
Copy your images to the folder and run convert
followed by the original file, color palette and the output. Example:
./convert example.jpg kanagawa-dragon example_kanagawa-dragon.jpg
The output file argument is optional, by default, the converted image will be saved to [original name]_[color palette].[original extension]
.
Color palettes are stored in palettes/[palette name].py
. Currently includes color schemes from:
To create a palette file, define a list palette
and store the hex codes as strings. For example, the contents of a palette file that recolors to black and white could simply be:
palette = [
'#000000',
'#ffffff'
]