Skip to main content

adjustHue

function

Adjust the hue of a color. Rotates the hue on the color wheel.

function adjustHue(color: string, degrees: number): string

Import

import { adjustHue } from '@modular/sdk';

Notes

returns
The adjusted color as hex or rgba string
throws
Error if the color format is invalid
example
```ts adjustHue('#ff0000', 120) // Red to green adjustHue('#ff0000', 240) // Red to blue adjustHue('#ff0000', -60) // Red to yellow-orange ```