HSLuv

hsluv.org ↗

Choose colours with saturation scaled to the available RGB range.

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Yes AI reading, not confirmed
Sign-up required
Not confirmed

Ask SI about HSLuv

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the HSLuv homepage

What it does

HSLuv is a colour model and set of implementations based on CIELUV. It expresses available chroma as a saturation percentage, with a browser demonstration for hue, saturation and lightness.

HSLuv calculates the colour boundary for a chosen hue and lightness, then expresses saturation within that boundary. HPLuv uses a more restricted common chroma range across hues, producing its pastel variant.

Choose an implementation for the language in use. The Python package converts hue, saturation and lightness into hex or RGB and supports the reverse conversions. Hue uses 0 to 360, while saturation and lightness use 0 to 100.

The Python implementation leaves small floating-point errors visible, so output may need rounding before display. Port authors can compare results against the reference project’s JSON snapshots, including intermediate conversion values.

The reference implementation is MIT licensed and the mathematics is public domain. Individual ports have their own documentation and licence terms.

Strengths

  • Reference snapshots help verify conversions in another programming language.

Watch out for

  • Port-specific numerical behaviour and licensing need checking.

Best for

  • Developers building colour pickers or hue-based palettes

Sources