🔄 Inverts the red, green, and blue components of a color.

Syntax

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

colorInvert(input: any, format?: ColorFormat): any
  • format: The output format (default: 'hex').

Examples

TypeScript
colorInvert('white'); //=> '#000000'
colorInvert('black'); //=> '#ffffff'
colorInvert('red'); //=> '#00ffff'
Last updated on
Edit this page