Skip to content

HSLuv

The HSLuv color space is not registered in Color by default

Properties

Name: hsluv

White Point: D65 / 2˚

Coordinates:

Name Range
h [0, 360)
s [0, 100]
l [0, 100]

HSLuv 3D

HSLuv color space in 3D

HSLuv is a human-friendly alternative to HSL. It was formerly known as "HUSL" and is a variation of the CIELChuv color space, where the chroma component is replaced by a saturation component which allows you to span all the available chroma as a percentage. HSLuv is constrained to the sRGB gamut.

Learn about HSLuv

Channel Aliases

Channels Aliases
h hue
s saturation
l lightness

Input/Output

HSLuv is not currently supported in the CSS spec, the parsed input and string output formats use the color() function format using the custom name --hsluv:

color(--hsluv h s l / a)  // Color function

When manually creating a color via raw data or specifying a color space as a parameter in a function, the color space name is always used:

Color("hsluv", [0, 0, 0], 1)

The string representation of the color object and the default string output use the color(--hsluv h s l / a) form.

>>> Color("hsluv", [12.177, 100, 53.237])
color(--hsluv 12.177 100 53.237 / 1)
>>> Color("hsluv", [44.683, 100, 74.934]).to_string()
'color(--hsluv 44.683 100 74.934)'

Registering

from coloraide import Color as Base
from coloraide.spaces.hsluv import HSLuv

class Color(Base): ...

Color.register(HSLuv())