🧊 Decreases the saturation of a color.
Syntax
TypeScript
import { colorDesaturate } from '@opentf/std'; colorDesaturate(input: ColorInput, amount: number, format?: ColorFormat): any
amount: A number between0and1.format: The output format (default:'hex').
Examples
TypeScript
colorDesaturate('red', 0.5); //=> '#bf4040' colorDesaturate('red', 0.5, 'rgba-object'); //=> { r: 191, g: 64, b: 64, a: 1 }