Gradient Color Space

gradient-cs

Sets the color space that the gradient stops blend in. This changes the colors between stops, not the stops themselves. It is ignored with gradient-mask.

ValueDescription
srgb (default)Blends in gamma-encoded sRGB, matching a browser’s default CSS gradient.
linearBlends in linear-light sRGB: gamma is removed before blending.
oklabA perceptually uniform space; transitions look even to the eye.
oklchThe polar form of Oklab. Gives vivid, even ramps between saturated colors.
lchLightness, chroma, and hue, derived from CIELAB.
hslHue, saturation, and lightness.
hsvHue, saturation, and value.

In the hue color spaces (oklch, lch, hsl, hsv), gradient-hue sets which way around the color wheel the blend travels.