Skip to content

Function: saturate() ​

ts
function saturate(hex, amount): string;

Increases the saturation of a hex color by amount percent.

Parameters ​

ParameterType
hexstring
amountnumber

Returns ​

string

Example ​

ts
saturate('#336699', 20) // => '#1a6eb3'

Since ​

1.0.0

Released under the MIT License.