setHS

open fun setHS(hue: Float, saturation: Float, value: Int)(source)

Sets the hue and saturation of the color, maintaining the current alpha. The value (brightness) component of the HSV color is set to 1.0f (fully bright). The alpha is updated based on the provided value parameter, which is treated as a percentage (0-100) and scaled to an alpha value (0-255).

Parameters

hue

The hue component of the color (0-360).

saturation

The saturation component of the color (0-1).

value

The desired opacity percentage (0-100), which will be converted to an alpha value (0-255).