Skip to main content

Generate terminal colorschemes from images

Project description

colorgen

Generate terminal colorschemes from images for kitty, AwesomeWM, Waybar, dunst, and rofi.

Repo: Codeberg (primary) · GitHub (mirror)

PyPI version Total Downloads PyPI - Downloads CI

Documentation · PyPI

Dark theme example

Install

pip install colorgen

Or from source:

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

Requires Python 3.12+.

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

When applying, the old theme gets commented out, not deleted.

How it works

Extracts 10 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)

Development

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

License

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

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

colorgen-1.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colorgen-1.1.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file colorgen-1.1.0.tar.gz.

File metadata

  • Download URL: colorgen-1.1.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for colorgen-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1b6ee07941bafd0d1773bbcf94c8ad237fb8e32590d1e00d6b6da576b03d4e20
MD5 90b82b7132f22ca781c4c5e5fd558156
BLAKE2b-256 163f8d04f1545f0e9d26a2311f80eb1ca2bcb0ca2bcc8d81ac136e028429b2e0

See more details on using hashes here.

File details

Details for the file colorgen-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: colorgen-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for colorgen-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f985c5a50cfcebef390990fe26bfa87e7526b0ca3036276880b6ced7162d3c1
MD5 15a56c24590f4e3b77341f1cb0da02dd
BLAKE2b-256 73474dcf3ebd57f96950c397283a960c84d16593c5f914ede81bf65e63c3a3c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page