Function setLightness

  • Set the lightness value for a color to a specific value.


    a new color with the new lightness value


    • color: Color

      the color to set the value for

    • lightness: string | number

      a number or string between [0,1.0] or 0 and 100 representing lightness as a percentage (1 will be treated at 1% whereas 1.0 will treated as 1%, however, 1.0 must be entered as a string because JavaScript cannot distinguish between 1 and 1.0 as a number.

    Returns Color

Generated using TypeDoc