You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **`<hue>`**[CSS](/en-US/docs/Web/CSS)[data type](/en-US/docs/Web/CSS/CSS_Types) represents the hue angle of a color.
16
16
It is used in the color functions that accept hue expressed as a single value, specifically [`hsl()`](/en-US/docs/Web/CSS/color_value/hsl), [`hwb()`](/en-US/docs/Web/CSS/color_value/hwb), [`lch()`](/en-US/docs/Web/CSS/color_value/lch), and [`oklch()`](/en-US/docs/Web/CSS/color_value/oklch) functional notations.
17
17
18
+
## Syntax
19
+
20
+
A `<hue>` can be either an `<angle>` or a `<number>`.
21
+
22
+
### Values
23
+
24
+
- {{CSSXref("<angle>")}}
25
+
- : An angle expressed in degrees, gradians, radians, or turns using the `deg`, `grad`, `rad`, or `turn`, respectively.
26
+
-`<number>`
27
+
- : A real number, representing degrees of the hue angle.
28
+
29
+
As an `<angle>` is periodic, `<hue>` is normalized to the range `[0deg, 360deg)`. It implicitly wraps around such that `480deg` is the same as `120deg`, `-120deg` is the same as `240deg`, `-1turn` is the same as `1turn`, and so on.
30
+
31
+
## Description
32
+
18
33

19
34
20
35
The color wheel above shows hues at all angles in the [sRGB](https://en.wikipedia.org/wiki/SRGB) {{glossary("color space")}}. In particular, _red_ is at `0deg`, _yellow_ is at `60deg`, _lime_ is at `120deg`, _cyan_ is at `180deg`, _blue_ is at `240deg`, and _magenta_ is at `300deg`.
@@ -106,24 +121,11 @@ The following table lists typical colors at various angles in the sRGB (used by
106
121
</tbody>
107
122
</table>
108
123
109
-
## Syntax
110
-
111
-
A `<hue>` can be either an `<angle>` or a `<number>`.
112
-
113
-
### Values
114
-
115
-
- {{CSSXref("<angle>")}}
116
-
- : An angle expressed in degrees, gradians, radians, or turns using the `deg`, `grad`, `rad`, or `turn`, respectively.
117
-
-`<number>`
118
-
- : A real number, representing degrees of the hue angle.
119
-
120
-
As an `<angle>` is periodic, `<hue>` is normalized to the range `[0deg, 360deg)`. It implicitly wraps around such that `480deg` is the same as `120deg`, `-120deg` is the same as `240deg`, `-1turn` is the same as `1turn`, and so on.
121
-
122
-
### Interpolation
124
+
## Interpolation of `<hue>` values
123
125
124
126
`<hue>` values are interpolated as {{CSSXref("<angle>")}} values, and the default interpolation algorithm is [`shorter`](/en-US/docs/Web/CSS/hue-interpolation-method#values). In some color-related CSS functions, this can be overridden by the {{CSSXref("<hue-interpolation-method>")}} component.
0 commit comments