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

component2

inline operator fun Int.component2(): Int

Return the red component of a color int. This is equivalent to calling:

Color.red(myInt)

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

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