ChromifyPro

ChromifyPro is a Python library for working with color palettes and themes.
It comes with built-in templates and also allows loading custom palettes from ZIP files.
Features
- Preloaded color templates accessible via a global dictionary.
- Load custom palettes from ZIP files containing JSON, CSV, or TXT color files.
- Supports hex color strings (
#RRGGBB or #RGB).
- Password-protected ZIP files are supported (default password:
"ChromifyPro").
Installation
pip install ChromifyPro
Usage
1. Using Built-in Templates
ChromifyPro automatically loads templates from the ChromifyPro_template folder when imported.
Use the global TEMPLATE_COLORS dictionary to access them.
from ChromifyPro import TEMPLATE_COLORS
print("Available palettes:", list(TEMPLATE_COLORS.keys()))
palette_name = "palette_01"
colors = TEMPLATE_COLORS.get(palette_name, [])
print(f"Colors in {palette_name}: {colors}")
Example structure of TEMPLATE_COLORS:
{
"palette_01": ["#FF0000", "#00FF00", "#0000FF"],
"palette_02": ["#123456", "#ABCDEF"],
}
2. Loading Custom Templates from a ZIP File
The load_from_zip function allows loading custom palettes from a ZIP file:
- JSON:
[{"hex": "#FF0000"}, {"hex": "#00FF00"}]
- CSV:
name,hex
- TXT: each line is a hex color like
#RRGGBB
from ChromifyPro import load_from_zip
colors = load_from_zip("/path/to/custom_palettes.zip")
for color in colors:
print(color.to_hex())
Returns a list of Color objects ready to use.
3. Updating TEMPLATE_COLORS with Custom ZIP
After loading a ZIP, refresh the global TEMPLATE_COLORS to include new palettes:
from ChromifyPro import load_from_template, TEMPLATE_COLORS
TEMPLATE_COLORS = load_from_template()
custom_colors = TEMPLATE_COLORS.get("my_custom_palette", [])
print(custom_colors)
Notes
- Password-protected ZIP files use
"ChromifyPro" as the default password.
- Supported file types inside the ZIP: JSON, CSV, TXT.
- Hex colors must follow the standard format:
#RRGGBB or #RGB.
License
This project is licensed under the MIT License.
Example Directory Structure
ChromifyPro/
├── __init__.py
├── Color.py
├── Converter.py
├── utils.py
├── ChromifyPro_template/
│ ├── palette_01.json
│ ├── palette_02.csv
│ └── ...
└── ...
References