CSS <hue-interpolation-method> Data Type
The <hue-interpolation-method> data type sets which way round the color wheel hues are mixed: shorter, longer, increasing or decreasing hue.
Description
The <hue-interpolation-method> CSS data type chooses which way around the color wheel the hue travels when the browser blends two colors in a polar color space (hsl, hwb, lch or oklch). Because hue is an angle, there are always two possible paths between two hues: the short way and the long way round. This type is written after the color space in a <color-interpolation-method>, for example in oklch longer hue, in color-mix() and in gradients.
shorter hue is the default and takes the shorter arc, so a blend from red (0deg) to blue (240deg) passes through magenta. longer hue takes the longer arc, through yellow, green and cyan, which is the easy way to make a rainbow. increasing hue always moves to higher angles (clockwise) and decreasing hue always moves to lower angles, whichever arc is shorter; these are useful when animating hues in a consistent direction.
A notable trick: a gradient from a color to itself is normally a solid color, but with longer hue the hue travels the full 360 degrees, giving a complete spectrum, for example linear-gradient(in hsl longer hue, red, red).
Examples:
.short {
background: linear-gradient(in oklch shorter hue to right, oklch(70% 0.2 30), oklch(70% 0.2 270));
}
.long {
background: linear-gradient(in oklch longer hue to right, oklch(70% 0.2 30), oklch(70% 0.2 270));
}
.spectrum {
background: conic-gradient(in hsl longer hue, red, red);
}
Interactive Demo
Syntax
<hue-interpolation-method> = [ shorter | longer | increasing | decreasing ] hue
Values
- shorter hueInterpolates along the shorter arc between the two hues. This is the default.
- longer hueInterpolates along the longer arc between the two hues.
- increasing hueAlways interpolates toward higher hue angles (clockwise), whichever arc that is.
- decreasing hueAlways interpolates toward lower hue angles (counter-clockwise), whichever arc that is.
Example
Browser Support
The following information will show you the current browser support for the CSS hue-interpolation-method data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.
Desktop





Tablets & Mobile





