Desaturate
- 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Desaturate
- Updated on 18 May 2022
- 1 Minute to read
-
DarkLight
-
PDF
Returns the color with the saturation component decreased by a percentage, given as a decimal number between 0 and 1.
Function signature
DESATURATE(color: String, saturationpercentage: Number) => String
Parameter | Description |
---|---|
Color | Color |
Saturation percentage | Percentage to decrease saturation (0...1) |
Examples
Formula | Return value |
---|---|
DESATURATE("#0bc", 0.5) |
rgb(51,145,153) |
DESATURATE("rgb(10, 20, 40)", 0.5) |
rgb(22,24,28) |
DESATURATE("hsl(80, 20%, 40%)", 0.3) |
rgb(98,91,113) |
DESATURATE("red", 0.2) |
rgb(230,25,25) |
Was this article helpful?