Function: saturate

Function: saturate

since 0.3.9

Usage

 saturate(input: image, amount: saturation amount)

Saturate or desaturate an image. Saturation makes the colors brighter, desaturation makes the image more grey.

To saturate use an amount between 0 (no saturation) and 1 (super crazy, too much saturation).

To desaturate use an amount between 0 (no desaturation) and -1 (convert to greyscale).

Parameters

Parameter Type Description
input image Image to (de)saturate.
alpha real number Saturation factor.

Examples

 saturate("image5.png", amount:  0.5)  ==  [[Image]]
 saturate("image5.png", amount:  0.5) == "image_saturate1.png"
 saturate("image5.png", amount: -0.5)  ==  [[Image]]
 saturate("image5.png", amount: -0.5) == "image_saturate2.png"
 saturate("image_logo.png", amount: -1)  ==  [[Image]]
 saturate("image_logo.png", amount: -1) == "image_logo_desaturate.png"