Imgix APIsRendering APIStylizeGradient Map Color Space

Gradient Map Color Space

gradient-map-cs

The gradient-map-cs parameter sets the color space used to interpolate between the colors of a gradient-map. It takes the same values as fill-gradient-cs and defaults to srgb.

ValueInterpolation
srgb (default)Standard web color values, with the sRGB gamma curve applied
linearLight intensity, without gamma correction
oklabPerceptually uniform, so equal steps look equally different
oklchThe cylindrical form of oklab, with lightness, chroma and hue
lchThe cylindrical form of CIELAB, with lightness, chroma and hue
hslHue, saturation and lightness
hsvHue, saturation and value

An unrecognized value falls back to srgb.

The cylindrical spaces — hsl, hsv, lch and oklch — travel around a hue wheel to get from one color to the next, so they sweep through intermediate hues that the straight-line spaces skip. Which way they go is set by gradient-map-hue.

gradient-map-cs=srgb, the default
sandbox-demo
gradient-map-cs=oklch sweeps through the hues between navy and gold
sandbox-demo