Skip to main content

colorgen

Generate terminal colorschemes from images for kitty, AwesomeWM, Waybar, dunst, rofi, tmux, waylock, and wlr-utils.

Repo: Codeberg (primary) · GitHub (mirror)

PyPI version Total Downloads PyPI - Downloads CI

Documentation · PyPI


Dark theme example

Install

Requires Python 3.12 or 3.13.

pip install colorgen

Or from source:

git clone https://codeberg.org/piotrkrzysztof/colorgen.git
cd colorgen
make install

Usage

# Preview colors from an image
colorgen wallpaper.png --preview

# Generate and apply a kitty colorscheme
colorgen wallpaper.png --config kitty --theme dark --apply

# Multiple targets
colorgen wallpaper.png --config kitty awesome rofi --apply

# All targets
colorgen wallpaper.png --full-config --theme dark --apply

After applying - old theme gets commented out, not deleted.

How it works

Extracts 18 dominant colors from the image via K-means clustering, then maps them to a 19-color terminal palette (bg, fg, cursor, colors 0-15) based on hue diversity and luminance.

Supported targets

  • kitty - terminal color config
  • AwesomeWM - window manager theme (awesomewm-basileia layout)
  • Waybar - status bar colors via @define-color CSS variables
  • dunst - notification daemon colors via dunstrc.d drop-in
  • rofi - launcher theme (adi1090x/rofi layout)
  • tmux - status line, panes, menus and popups via a sourced snippet (tmux 3.8+)
  • waylock - screen locker colors as shell variables (lock script example)
  • wlr-utils - wlr-chooser screencast picker and wlr-switcher Alt-Tab overlay

Development

make install   # install deps
make test      # run tests
make lint      # check code style

License

GPL-3.0-or-later. Built with Pylette.


To the only God, be honour and glory for ever and ever.

Metadata

Release files for colorgen 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colorgen 1.2.0
File Size Uploaded Provenance Actions
colorgen-1.2.0.tar.gz 31.1 kB Without provenance Details for colorgen-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for colorgen 1.2.0
File Interpreter ABI Platform Actions
colorgen-1.2.0-py3-none-any.whl Python 3 none any Details for colorgen-1.2.0-py3-none-any.whl

Total release size: 69.4 kB

Release files / colorgen-1.2.0.tar.gz

Download URL colorgen-1.2.0.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c5c58e26552c4be71b18301522be8576030f2ee1e9a4d8f5e65adcb161bd4149
BLAKE2b-256 checksum
How to use checksums
86592955b51a22bebba4ab2d7f55ed9064d310d90ad91e17b682db14c8ababc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / colorgen-1.2.0-py3-none-any.whl

Download URL colorgen-1.2.0-py3-none-any.whl
Size 38.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e833975d1480526ae8d4c9e937f210786f0480c51f87695b6d7973bcd85a330
BLAKE2b-256 checksum
How to use checksums
9f7bd90d67c555185662915e272fed6236b163101e7f11d04bdb66fcc0bc281b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for colorgen 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page