---
title: "fromColorLong"
description: "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."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
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.



