Py5Graphics.saturation()#

Extracts the saturation value from a color.

Description#

Extracts the saturation value from a color.

This method has additional color functionality that is not reflected in the method’s signatures. For example, you can pass the name of a color (e.g. “green”, “mediumpurple”, etc). Look at the online “All About Colors” Python Ecosystem Integration tutorial for more information.

This method is the same as saturation() but linked to a Py5Graphics object. To see example code for how it can be used, see saturation().

Underlying Processing method: PGraphics.saturation

Signatures#

saturation(
    rgb: int,  # any value of the color datatype
    /,
) -> float

Updated on December 25, 2023 16:36:33pm UTC