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.3.tar.gz (26.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.3-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colorgen-1.1.3.tar.gz
  • Upload date:
  • Size: 26.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.3.tar.gz
Algorithm Hash digest
SHA256 7e01cc04081a97faf55e099bdbe736731175b90b2534704638cbbd73dbf59f0d
MD5 5335fa6ac125d7d758291ba792f269e0
BLAKE2b-256 587b9e5f2c46b0f04dfce5ae27869299ff5512874176541a9e6ad834978fbaec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colorgen-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 31.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78a09873e4938ec87b8e6e43447f99d8fc17ee5bade65110437b6d996d69044e
MD5 f80c65ca7ec5162a6f6e9c78552f619e
BLAKE2b-256 0504b28741c2ab46ee7ed02d33a11c8bf3c5a9656caa82d047f58373a4f9c26f

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