Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

toArgb

Converts this color to an ARGB color int.

toArgb

Source set: Common
@ColorInt
fun Color.toArgb(): Int

Converts this color to an ARGB color int. A color int is always in the [sRGB]ColorSpaces.Srgb color space. This implies a color space conversion is applied if needed.

Returns

An ARGB color in the sRGB color space

Last updated: