component2

@RequiresApi(value = 26)
inline operator fun Color.component2(): Float(source)

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) = myColor

inline operator fun Int.component2(): Int(source)

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

@RequiresApi(value = 26)
inline operator fun Long.component2(): Float(source)

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

inline operator fun Point.component2(): Int(source)
inline operator fun PointF.component2(): Float(source)

Returns the y coordinate of this point.

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

val (x, y) = myPoint

inline operator fun Rect.component2(): Int(source)
inline operator fun RectF.component2(): Float(source)

Returns "top", the second component of the rectangle.

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

val (left, top, right, bottom) = myRectangle