No project description provided
Project description
🎨 Paletted
A lightweight CLI utility for dynamic theme generation. It derives color palettes from live wallpapers or images and applies them across the system through configurable templates and appliers
How It Works
- Extract a frame from the wallpaper (or use the image directly)
- Generate a Material Design color palette with Matugen
- Apply colors to templates and appliers
- Execute configured commands and wallpaper backend
Installation
Dependencies:
python >= 3.11magentumffmpegpipx
pipx install paletted
Configuration
paletted/
├── appliers/
│ └── hyprland.py # Custom theme applier
├── templates/
│ └── hyprland.conf.template # Example configuration template
├── config.toml # Main configuration file
└── another_config.toml # Included configuration module
Main Configuration
The main configuration file contains global settings, notification options, wallpaper backends, and imported modules
# config.toml
# Include external modular configurations
[[include]]
target = "./another_config.toml"
[settings]
# Path to save the extracted frame preview
save_frame_to = "./wallpaper_preview.png"
[notification]
enable = true
summary = "Paletted-Themes"
text = "Theme applied. Wallpaper updated"
# Executed when the wallpaper source is a video
[[backend]]
type = "video"
exec = "smooth-slapper %wallpaper_path%"
# Executed when the wallpaper source is a static image
[[backend]]
type = "image"
exec = "smooth-slapper %wallpaper_path%"
# Target package application mapping
[[package]]
name = "hyprland"
template = "hyprland.conf.template"
target = "~/.config/hypr/theme.conf"
exec = [["hyprctl", "reload"], ["echo", "Goida"]]
# Theme applier name without .py extension
[[appliers]]
applier = "hyprland"
Theme template
Colors can be referenced using placeholders and modifiers:
{{color.modifier(factory)}}
where color is the base color, modifier is the transformation to apply, and factory is the modifier parameter
Modifiers:
.alpha(factor) -> Sets opacity (0.0 to 1.0) | Example: {primary.alpha(0.5)}
.dark(factor) -> Darkens the color (factor > 1) | Example: {primary.dark(1.2)}
.light(factor) -> Lightens the color (factor > 1) | Example: {secondary.light(1.5)}
.sat(factor) -> Modulates saturation (0.0 - 5) | Example: {tertiary.sat(0.5)}
.rgb -> Formats to CSS rgb/rgba string | Example: {surface.rgb}
.strip -> Removes the '#' prefix symbol | Example: {error.strip}
Palette Colors:
# Primary
accent = "{primary}"
on_accent = "{on_primary}"
container = "{primary_container}"
on_container = "{on_primary_container}"
# Secondary
accent = "{secondary}"
on_accent = "{on_secondary}"
container = "{secondary_container}"
on_container = "{on_secondary_container}"
# Tertiary
accent = "{tertiary}"
on_accent = "{on_tertiary}"
container = "{tertiary_container}"
on_container = "{on_tertiary_container}"
# Surface
background = "{background}"
on_background = "{on_background}"
surface = "{surface}"
on_surface = "{on_surface}"
variant = "{surface_variant}"
on_variant = "{on_surface_variant}"
# Borders
outline = "{outline}"
outline_variant = "{outline_variant}"
# Error
accent = "{error}"
on_accent = "{on_error}"
container = "{error_container}"
on_container = "{on_error_container}"
# Inverse
surface = "{inverse_surface}"
on_surface = "{inverse_on_surface}"
primary = "{inverse_primary}"
Example:
# hyprland.conf.template
$active_border_1 = {{on_secondary.strip}} -> 313032
$active_border_2 = {{outline.strip}} -> 929095
$inactive_border = {{surface.strip}} -> 141314
$shadow = {{outline.strip}} -> 929095
Custom appliers
Appliers provide a programmatic way to generate output when template-based substitution is not flexible enough
Each Applier must define a function whose name matches the file name:
# hyprland.py
def hyprland(color_parser) -> None:
print(color_parser("primary.rgb"))
The provided color_parser callable can be used to resolve any supported color placeholder
Usage
Generate and apply a theme:
palleted apply /path/to/wallpaper/ # --source-index 0-1 --config-dir /path/to/paletted_configs/
Restore the previous wallpaper:
palleted restore # --config-dir /path/to/paletted_configs/
Why Paletted?
Unlike static themes, Paletted automatically generates a cohesive color scheme based on your wallpaper and applies it to your entire desktop environment and applications, in accordance with templates and appliers.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paletted-1.0.2.tar.gz.
File metadata
- Download URL: paletted-1.0.2.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d940e3b96627ff6a29ac56d082b1f54a9efa657bd676944ed717c72842f4d95
|
|
| MD5 |
71ab4b84f5a31e393da9ef3eae82ef6a
|
|
| BLAKE2b-256 |
865756707e36ed3a51f25769443836673c20d47b46be8f6911c0306f94fc64da
|
Provenance
The following attestation bundles were made for paletted-1.0.2.tar.gz:
Publisher:
python-publish.yml on PixelLoop-uwu/Paletted
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paletted-1.0.2.tar.gz -
Subject digest:
8d940e3b96627ff6a29ac56d082b1f54a9efa657bd676944ed717c72842f4d95 - Sigstore transparency entry: 1682879153
- Sigstore integration time:
-
Permalink:
PixelLoop-uwu/Paletted@87feaa858b0784b64b9fdda09ecc3a88f37cf6c8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PixelLoop-uwu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@87feaa858b0784b64b9fdda09ecc3a88f37cf6c8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file paletted-1.0.2-py3-none-any.whl.
File metadata
- Download URL: paletted-1.0.2-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9414c2909946abd2e8f6a1384a7e559fe8d343504daa4933cdeefc8ee47c8ad0
|
|
| MD5 |
92f1d490d7a77138f5454f5d8161a5f7
|
|
| BLAKE2b-256 |
b803e84554571f742e876ed22760aac4874065d9295ab8e92672c4fca73ed1f8
|
Provenance
The following attestation bundles were made for paletted-1.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on PixelLoop-uwu/Paletted
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paletted-1.0.2-py3-none-any.whl -
Subject digest:
9414c2909946abd2e8f6a1384a7e559fe8d343504daa4933cdeefc8ee47c8ad0 - Sigstore transparency entry: 1682879166
- Sigstore integration time:
-
Permalink:
PixelLoop-uwu/Paletted@87feaa858b0784b64b9fdda09ecc3a88f37cf6c8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PixelLoop-uwu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@87feaa858b0784b64b9fdda09ecc3a88f37cf6c8 -
Trigger Event:
workflow_dispatch
-
Statement type: