Skip to main content

colorBrightness

Brightens or darkens a HEX color based on the amount specified. Behaves like the SASS lighen and darken. Will always return with # symbol.

Parameters

  • hex string HEX color to change brightness
  • amount number positive or negative percentage

Examples

colorBrightness('#3CB878', 50);
// => '#6EEAAA'

colorBrightness('#3CB878', -50);
// => '#A8646'

Returns string of manipulated HEX color.

Meta

  • version: 1.7.1