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

component1

inline operator fun Int.component1(): Int

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

Color.alpha(myInt)

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

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