Colors
colorRotateHue

🎡 Rotates the hue of a color.

Syntax

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

colorRotateHue('red', 120); //=> '#00ff00' (lime)
colorRotateHue('red', -120); //=> '#0000ff' (blue)

Try