The hue rotation calculator shifts a color around the color wheel by a chosen number of degrees while keeping its saturation and lightness intact. It is the fastest way to find complementary colors, build analogous palettes, or explore variations of a brand color.
How it works
Hue is the angular dimension of the HSL color model, measured from 0 to 360 degrees: 0 is red, 120 is green, 240 is blue. To rotate a color the tool:
- Converts the input RGB color to HSL.
- Adds the degree offset to the hue and wraps it back into range with
((hue + offset) mod 360 + 360) mod 360, so both positive and negative offsets work. - Converts the new HSL value back to RGB and hex.
Saturation and lightness are never touched, so only the color family changes — the vividness and brightness stay the same.
Notes and example
- A rotation of
180yields the complementary color. For example#3498db(a blue) rotated by 180 lands near#db8434, an orange. - Rotations of
±120produce the two triadic partners. - Achromatic colors (greys, black, white) have no saturation, so rotating their hue has no visible effect.
This is a pure HSL hue shift; the CSS hue-rotate() filter uses a slightly different luminance-preserving matrix. All math runs locally in your browser.