Color shades generator
Project description
Kleur: HSLuv based color utils & theme generators
I'd like to give special credits to Alexei Boronine and everyone else who contributed to the HSLuv project. This work provided the fundaments to build this package on (and is the only dependency used in it).
Installation
pip install kleur
Usage
Preview a color theme
General help
$ kleur theme -h
usage: kleur theme [-h] [-c NAME=HUE (1-360) [NAME=HUE (1-360) ...]]
[-m] [-a] [-s NUMBER_OF_SHADES] [-v NUMBER_OF_VIBRANCES]
options:
-h, --help show this help message and exit
-c, --colors NAME=HUE (1-360) [NAME=HUE (1-360) ...]
-m, --merge-with-default-theme
-a, --alt-default-theme
-s, --number-of-shades NUMBER_OF_SHADES
-v, --number-of-vibrances NUMBER_OF_VIBRANCES
Preview default theme
$ uv run kleur theme -s 7
Preview custom theme
$ kleur theme -s 7 -c green=133 blue=257 tomato=20
Preview custom theme merged with default theme
$ kleur theme -s 7 -c green=133 blue=257 tomato=20 -m
Generate shades (as CSS variables), based one 1 or 2 (hex) colors
General help
usage: kleur css [-h] [-l LABEL] -c COLOR1 [-k COLOR2] [-s NUMBER_OF_SHADES] [-b] [-i] [-d DYNAMIC_RANGE]
options:
-h, --help show this help message and exit
-l, --label LABEL
-c, --color1 COLOR1
-k, --color2 COLOR2
-s, --number-of-shades NUMBER_OF_SHADES
-b, --include-black-and-white
-i, --include-input-shades
-d, --dynamic-range DYNAMIC_RANGE
Based on one input color
$ kleur css doodle -c d00d1e -s 9
With input markers:
$ kleur css doodle -c d00d1e -s 9 -i
Based on two input colors
The dynamic range specifies to what degree the hue of the input colors will be used as boundaries:
-
Dynamic range 0 (0%):
The shades will interpolate (or extrapolate) between the input colors.
-
Dynamic range between 0 and 1 (between 0% and 100%):
The shades will interpolate (or extrapolate) between darker / brighter shades of the input colors.
-
Dynamic range 1 (100%):
The shades will interpolate between the darkest & brightest shades of the input colors.
$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 66
With input markers, varying in dynamic range:
$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 0 -i
$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 50 -i
$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 100 -i
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kleur-1.3.0.tar.gz.
File metadata
- Download URL: kleur-1.3.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42eba2c2e8abcc69242a003a421f6d9be71b808a8963d583c2e2934487893b22
|
|
| MD5 |
b6c608daf6e820b9f9205250539cbe52
|
|
| BLAKE2b-256 |
ad6467913b4e64ed7d363ed0a2999c99aa6fd5226d8eaeecac494d7d743f77d0
|
Provenance
The following attestation bundles were made for kleur-1.3.0.tar.gz:
Publisher:
on-release-tag__publish-to-pypi.yml on githuib/kleur
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kleur-1.3.0.tar.gz -
Subject digest:
42eba2c2e8abcc69242a003a421f6d9be71b808a8963d583c2e2934487893b22 - Sigstore transparency entry: 764168306
- Sigstore integration time:
-
Permalink:
githuib/kleur@c17c985c0950a96b8294c58e58cf05fc5e617d91 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/githuib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-release-tag__publish-to-pypi.yml@c17c985c0950a96b8294c58e58cf05fc5e617d91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kleur-1.3.0-py3-none-any.whl.
File metadata
- Download URL: kleur-1.3.0-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a2663fb1dea7af23c580ea643fe99d468385b8df1cf44b87503e16908679a63
|
|
| MD5 |
636713b3e77b51ed867c77173743934b
|
|
| BLAKE2b-256 |
15133cb52d2de6c72e4dfe95ca52651b954d5c5116a977e2987a8ae32508113c
|
Provenance
The following attestation bundles were made for kleur-1.3.0-py3-none-any.whl:
Publisher:
on-release-tag__publish-to-pypi.yml on githuib/kleur
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kleur-1.3.0-py3-none-any.whl -
Subject digest:
0a2663fb1dea7af23c580ea643fe99d468385b8df1cf44b87503e16908679a63 - Sigstore transparency entry: 764168307
- Sigstore integration time:
-
Permalink:
githuib/kleur@c17c985c0950a96b8294c58e58cf05fc5e617d91 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/githuib
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-release-tag__publish-to-pypi.yml@c17c985c0950a96b8294c58e58cf05fc5e617d91 -
Trigger Event:
push
-
Statement type: