Saturate
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Saturate

  • Dark
    Light
  • PDF

Returns the color with the saturation component increased by a percentage, given as a decimal number between 0 and 1.

Function signature

SATURATE(color: String, saturationpercentage: Number) => String
Parameter Description
Color Color
Saturation percentage Percentage to increase saturation (0...1)

Examples

Formula Return value
SATURATE("#0bc", 0.5) rgb(0,230,255)
SATURATE("rgb(10, 20, 40)", 0.5) rgb(0,16,53)
SATURATE("hsl(80, 20%, 40%)", 0.3) rgb(120,153,51)
SATURATE("red", 0.2) rgb(255,0,0)

Was this article helpful?

What's Next