core-ktx / androidx.graphics / kotlin.Long / component1

component1

inline operator fun Long.component1(): Float

Returns the first component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the first component is "red".

This method allows to use destructuring declarations when working with colors, for example:

val (red, green, blue, alpha) = myColorLong