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