Skip to main content

A HUSL color space conversion library that works with numpy

Project description

HUSL color space conversion

A color space conversion library that works with numpy. See http://husl-colors.org to learn about the HUSL color space.

Features

1. Fast conversion to RGB from HUSL and vice versa. Convert a 1080p image to HUSL in less than a second. 2. Seamless performance improvements with NumExpr, Cython, and OpenMP (whichever’s available). 3. Flexible numpy arrays as inputs and outputs. Plays nicely with OpenCV, MoviePy, etc.

Installation

  1. virtualenv env -p python3

  2. source env/bin/activate

  3. pip install numpy

  4. (optional) pip install Cython (or NumExpr, but Cython is preferred)

  5. pip install git+https://github.com/TadLeonard/husl-numpy.git

Basic usage

  • to_rgb(hsl) Convert HUSL array to RGB integer array

  • to_husl(rgb) Convert RGB integer array or grayscale float array to HUSL

  • array

  • to_hue(rgb) Convert RGB integer array or grayscale float array to array of

  • hue values

More

See https://github.com/TadLeonard/husl-numpy for complete documentation.

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

nphusl-1.4.0.tar.gz (63.2 kB view details)

Uploaded Source

File details

Details for the file nphusl-1.4.0.tar.gz.

File metadata

  • Download URL: nphusl-1.4.0.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nphusl-1.4.0.tar.gz
Algorithm Hash digest
SHA256 7c9c4f47de838f55317298890680d24ed54034fa935d931e93c49dc38ffb7f16
MD5 25d9d8bb561a27bc150fc57f7690ce70
BLAKE2b-256 5555f14294bbbe90f8ad49fc09a1145057b7d2fadb2af666ca743dc9a7d3b5fd

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page