Colors
colorLighten

💡 Increases the lightness of a color.

Syntax

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

colorLighten('#000', 0.5); //=> '#808080'
colorLighten('red', 0.2); //=> '#ff6666'
colorLighten('red', 0.2, 'hsl'); //=> 'hsl(0, 100%, 70%)'

Try