Function

toColorLong

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

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

toColorLong

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.