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

toColorLong

Converts the Color to a 64-bit ColorLong value that can be used by Android's framework.

toColorLong

Source set: Android
@ColorLong
fun Color.toColorLong(): Long

Converts the Color to a 64-bit ColorLong value that can be used by Android's framework. Color.value isn't fully compatible with Android's 64-bit ColorLong values as some color spaces differ, so this method handles the conversion. Color spaces that are not supported by the current Android API level will safely fallback to the ColorSpaces.Srgb color space.

Last updated: