setColorWithAlpha

open fun setColorWithAlpha(color: Int, alpha: Int)(source)

Sets the current color and its alpha value.

The color is stored internally, and its HSV (Hue, Saturation, Value) components are extracted. The provided alpha value is scaled from a 0-255 range to a 0-100 range for internal representation.

Parameters

color

The base color (RGB integer value, alpha component is ignored and replaced by the alpha parameter).

alpha

The alpha value for the color, in the range 0 (transparent) to 255 (opaque). This will be internally scaled to a 0-100 range.