saturate
inline fun <T : SaturatableColor<T>, ColorModel<T>, ConvertibleToColorRGBa> ColorRGBa.saturate(factor: Double): ColorRGBa(source)
Adjusts the saturation of the current ColorRGBa
based on a given factor.
Return
A new ColorRGBa
instance with the adjusted saturation, maintaining the linearity of the original color.
Parameters
T
The target color model type that supports saturation adjustments.
factor
The saturation adjustment factor. A value of 1.0 keeps the saturation unchanged, values less than 1.0 decrease saturation, and values greater than 1.0 increase it.