component2
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) = myColorReturn 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) = myColorReturns 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) = myColorLongReturns the y coordinate of this point.
This method allows to use destructuring declarations when working with points, for example:
val (x, y) = myPointReturns "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