Function setAlpha

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

    Returns

    a new color with the new alpha value

    Parameters

    • color: Color

      the color to set the value for

    • alpha: 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