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.2.tar.gz (25.7 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.2-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colorgen-1.1.2.tar.gz
  • Upload date:
  • Size: 25.7 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.2.tar.gz
Algorithm Hash digest
SHA256 a9480fc2f61f1a960e3cc4d41bfe6e3dbf0598e27d36ef389353455c9dcbf9b9
MD5 d85ee85a87fd6e944e84b11e20045941
BLAKE2b-256 6cca6b7e0e75c7c731b8ee3b33a3188e0b6303e6b1d6cd125558f038fa24fc77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colorgen-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 692e34ef0c7fa5bf1d21c6ab61ac30137b9821e8f8f16f306263ddffcd2c3a16
MD5 eded3a76e07d7aaff9aa97782e707131
BLAKE2b-256 ad84072640adf048bf5f1955fcc578f724bb7b02acff9ec403aa2c766e7a8c8b

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