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

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)

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.6.tar.gz (27.3 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.6-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colorgen-1.1.6.tar.gz
  • Upload date:
  • Size: 27.3 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.6.tar.gz
Algorithm Hash digest
SHA256 4d94bef0304f081713f60850ebea9ae0d872350958a59562456f79e5827f8099
MD5 ab0e4fedd09b1d7af26643f60dd62d25
BLAKE2b-256 b292ea1080ff9464bc1f6c6da2a19a2042d8945c8a3e7c70492dbb99d736ae45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colorgen-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 32.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 5f490819c1f6ed0f9425c26ed9beaa91e948aa36f38b66ab9b75a58f72558d89
MD5 7c549a7171ce416fc196774f0c6c3636
BLAKE2b-256 078c2d75df34308d335cbb0f117f39ca59c571c98761f0556ceac172906286f9

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