colorSaturate

🌈 Increases the saturation of a color.

Syntax

TypeScript
import { colorSaturate } from '@opentf/std';
colorSaturate({ value: ColorInput; amount: number; to?: ColorFormat }): any
  • value: The input color.

  • amount: A number between 0 and 1.

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

Examples

TypeScript
colorSaturate({ value: 'gray', amount: 0.5 }); //=> '#bf4040'
colorSaturate({ value: 'gray', amount: 0.5, to: 'hsl' }); //=> 'hsl(0, 50%, 50%)'

Try it

Last updated on
Edit this page