Imgix APIsRendering APIFillFill Gradient Hue

Fill Gradient Hue

fill-gradient-hue

The fill-gradient-hue parameter sets which way around the hue wheel a gradient fill travels between two colors. It follows the CSS Color 4 hue interpolation rules and defaults to shorter.

ValuePath taken
shorter (default)The shorter way around the wheel
longerThe longer way around the wheel, sweeping through the opposite hues
increasingThe path along which the hue angle increases
decreasingThe path along which the hue angle decreases

An unrecognized value falls back to shorter.

This parameter only has an effect in the cylindrical color spaces, so it is read when fill-gradient-cs is hsl, hsv, lch or oklch. In srgb, linear and oklab there is no hue wheel to travel around, and the value is ignored.

fill-gradient-hue=shorter, the default
sandbox-demo
fill-gradient-hue=longer takes the opposite path around the wheel
sandbox-demo

Setting both endpoints to the same color and choosing longer sweeps the full hue wheel, which is the shortest way to write a rainbow.