Function change_brightness

  • Changes the brightness of a given color code.

    Parameters

    • hex: string | number

      the input color in hex.

    • percent: number

      how much the brightness should change.

    Returns number

    returns the new color in hex.