Skip to main content

Color shades generator

Project description

Kleur: HSLuv based color utils & theme generators

Poetry PyPI - Version PyPI - Python Versions

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

alt text

Preview custom theme

$ kleur theme -s 7 -c green=133 blue=257 tomato=20

alt text

Preview custom theme merged with default theme

$ kleur theme -s 7 -c green=133 blue=257 tomato=20 -m

alt text

Generate shades (as CSS variables), based one 1 or 2 (hex) 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 (or extrapolate) between the darkest & brightest shades of the input 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

Shades as CSS variables, based on one input color

$ kleur css doodle -c d00d1e -s 9

alt text

Shades as CSS variables, based on one input color (with input markers)

$ kleur css doodle -c d00d1e -s 9 -i

alt text

Shades as CSS variables, based on two input colors

$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 66

alt text

Shades as CSS variables, based on two input colors (with input markers)

$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 0 -i

alt text

$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 50 -i

alt text

$ kleur css -l beatle-salads -c bea71e -k 5a1ad5 -s 9 -d 100 -i

alt text

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

kleur-1.2.5.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kleur-1.2.5-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file kleur-1.2.5.tar.gz.

File metadata

  • Download URL: kleur-1.2.5.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kleur-1.2.5.tar.gz
Algorithm Hash digest
SHA256 f3b4e08985aef09850314c610b8f330dd5305a82cfb4b04b23eaa26ab08c0a67
MD5 9dadfb213eefd82273f67aa5a82bed28
BLAKE2b-256 9cd16ac5786fe7b42c89701a5dbf5d8a76d7fa38d85499da8aa56cd11c43d740

See more details on using hashes here.

Provenance

The following attestation bundles were made for kleur-1.2.5.tar.gz:

Publisher: on-release-tag__publish-to-pypi.yml on githuib/kleur

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kleur-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: kleur-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kleur-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5f1815da9a86ce030886aa667f5a9e61cd4628a62baa4e06b9881991d6169257
MD5 58904f81ff233bc3eb7b410eddef0b2a
BLAKE2b-256 68fff1962323347a1f9f05c0bc4ad4537dc52cb254c1872c5a01b3f8053242ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for kleur-1.2.5-py3-none-any.whl:

Publisher: on-release-tag__publish-to-pypi.yml on githuib/kleur

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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