Function

fromColorLong

Creates a Color from an Android 64-bit color value.

fromColorLong

Source set: Android
public fun Color.Companion.fromColorLong(@ColorLong colorLong: Long): Color

Creates a Color from an Android 64-bit color value. This differs from the Color constructor accepting a Long in that the constructor assumes the incoming value is a 32-bit ARGB color, while this is a 64-bit ColorLong color from Android. Color.value isn't fully compatible with Android's 64-bit ColorLong values as some color spaces differ, so this method handles the conversion.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: