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

component2

inline operator fun Long.component2(): Float

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

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

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