Predefined Functions – sat

Function name: sat – Return saturation of argument
Synopsis: sat(c)


Input data type Output data type
color real

Description:

This function takes a color variable as input and returns the saturation of the color. The saturation of a color is always between 0 and 1. For more information about hue, saturation and luminance see HSL Colorspace.

Colors can be created by using one of the color creation functions:

Internally colors are stored in RGBA format. So in order to return the saturation of a color, this function needs to do a color space conversion, which is quite slow.

sat