Skip to content

Function: desaturate()

ts
function desaturate(hex, amount): string;

Decreases the saturation of a hex color by amount percent.

Parameters

ParameterType
hexstring
amountnumber

Returns

string

Example

ts
desaturate('#336699', 20) // => '#456080'

Since

1.0.0

Released under the MIT License.