adjustHexColor()
function adjustHexColor(hex, amount): HEX
Adjusts the brightness of a hex color by a given amount.
Parameters
Parameter | Type | Description |
---|---|---|
hex | string | The hex color to adjust. |
amount | number | The amount to adjust the brightness by. |
Returns
The adjusted hex color.
Example
adjustHexColor('#FF0000', 50); // '#FF7F7F'