setSaturation is a function that takes in a color and a saturation value, and returns a new color with the given saturation.
A new color with the given saturation.
Invalid Color if the color parameter is not a valid color
If the color is invalid or the saturation value is invalid (not a number between 0 and 100 or not a string in the format of "%d%").
The color that needs to have its saturation set.
The saturation value to set. Accepted input formats are either a number between 0 and 100, or a string representing a percentage (e.g. "50%").
Generated using TypeDoc
setSaturation is a function that takes in a color and a saturation value, and returns a new color with the given saturation.
Returns
A new color with the given saturation.
Throws
Invalid Color if the color parameter is not a valid color
Throws
If the color is invalid or the saturation value is invalid (not a number between 0 and 100 or not a string in the format of "%d%").