Skip to main content

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.

Metadata

Release files for colorgen 1.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colorgen 1.1.7
File Size Uploaded
colorgen-1.1.7.tar.gz 27.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colorgen 1.1.7
File Interpreter ABI Platform
colorgen-1.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 59.6 kB

Release files / colorgen-1.1.7.tar.gz

Download URL colorgen-1.1.7.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6bd04828f87c955cf526313a704fb0fc72163a643405b2c4f7dee6c1feb5906a
BLAKE2b-256 checksum
How to use checksums
adc29755f7df4fec5142838ed71682255f227c4b16c1929df2dffa7edd32556b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / colorgen-1.1.7-py3-none-any.whl

Download URL colorgen-1.1.7-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fde4ccd63ef781e796e3160849ec9a32d8fe3ea1743a1b33535efef11e10945d
BLAKE2b-256 checksum
How to use checksums
af455cc1bf62af2c6b788d6a7378a5171c09c5832002bde1306047d53523e48f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release history Release notifications | RSS feed

1.1.8

2 release files

This release

1.1.7 This release

2 release files

1.1.6

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page