Theme Builder 🎨
Create a custom color pallete based off an image to be used to theme system applications
theme_builder is a CLI utility designed for developers and power users who want to harmonize their system's aesthetic with their desktop wallpaper.
By analyzing an input image, the tool extracts a dominant color palette and automatically generates CSS variables and configuration files to update your applications' themes in real-time.
🚀 Features
Color Extraction: Uses clustering to find the most representative colors from any image (JPG/PNG). CSS Generation: Automatically generates a :root CSS file with your dynamic palette. Application Injection: Updates local configuration files or style sheets to apply your new theme system-wide. Cross-Language Power: Built with a focus on performance and reliability, leveraging [Go/Python] for backend logic.
🛠 Installation
Project is on my github page.
Clone the repository
git-clone https://github.com/Brady-MacDonald/theme_builder
cd theme_builder
pip install .
📖 Usage
Run the tool by pointing it to your current wallpaper or any inspiration image:
theme_builder --image ~/Pictures/wallpapers/forest.jpg --output ./themes/forest.css
Options: --image: Path to the source image. --output: Where to save the generated CSS. --update: (Optional) Path to a specific app config to inject styles into.
Theme Applied
📁 Project Structure
config.toml: Configuration file used to store project defaults, such as template names and number of colors to extract.
colors/: The core engine for color extraction and palette generation.
templates/:
- Boilerplate CSS/Config templates used for output.
- Uses the
hyprland.conf,swaync.css,waybar.cssas the templates to produce the colors for
🔧 Technical Details
This project showcases several backend engineering concepts: Image Processing: Efficiently sampling pixels to determine dominant hex codes. File I/O: Safely reading and rewriting application configuration files without data loss. CLI Design: Providing a clean, intuitive interface for complex background tasks.