🎡 Rotates the hue of a color.

Syntax

TypeScript
import { colorRotateHue } from '@opentf/std';

colorRotateHue(input: any, degrees: number, format?: ColorFormat): any
  • degrees: The degrees to rotate (can be negative).

  • format: The output format (default: 'hex').

Examples

TypeScript
colorRotateHue('red', 120); //=> '#00ff00' (lime)
colorRotateHue('red', -120); //=> '#0000ff' (blue)
Last updated on
Edit this page