💡 Increases the lightness of a color.

Syntax

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

colorLighten(input: ColorInput, amount: number, format?: ColorFormat): any
  • amount: A number between 0 and 1.

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

Examples

TypeScript
colorLighten('#000', 0.5); //=> '#808080'
colorLighten('red', 0.2); //=> '#ff6666'
colorLighten('red', 0.2, 'hsl'); //=> 'hsl(0, 100%, 70%)'
Last updated on
Edit this page