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.4.tar.gz (27.2 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.4-py3-none-any.whl (32.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: colorgen-1.1.4.tar.gz
  • Upload date:
  • Size: 27.2 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.4.tar.gz
Algorithm Hash digest
SHA256 709b46f3b9f732764343af806fc7f6b30f667bf5c15ffbbaa93fa49c4bee2f4d
MD5 44010e5f387ad71a003c2645f4df7c30
BLAKE2b-256 34b1525dcac7c260c55e62a553c88969875e939cf2b83a7cc5e3321fc4db651f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: colorgen-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 32.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 400e524a7147ae11962cfa05402905973641cb2dbc4023af07d10927212c727b
MD5 b09b9e92b2fca019e2d418e0d21fce0d
BLAKE2b-256 86b87392c6a310501f408d8743ced234de9ab6114870489a8cc6fe2692b5b73c

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