component1
Returns the first component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the first component is "red".
This method allows to use destructuring declarations when working with colors, for example:
val (red, green, blue) = myColor
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
Returns the first component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the first component is "red".
This method allows to use destructuring declarations when working with colors, for example:
val (red, green, blue, alpha) = myColorLong
Returns the x coordinate of this point.
This method allows to use destructuring declarations when working with points, for example:
val (x, y) = myPoint
Returns "left", the first component of the rectangle.
This method allows to use destructuring declarations when working with rectangles, for example:
val (left, top, right, bottom) = myRectangle