Color
Leave feedback
On this page
Inheritance: java.lang.Object
public class Color
Represents an ARGB (alpha, red, green, blue) color.
| Constructor | Description |
|---|---|
| Color(int alpha, int red, int green, int blue) | Initializes a new instance of the Color class. |
| Color(int red, int green, int blue) | Initializes a new instance of the Color class. |
| Color(Object data) | Initializes a new instance of the Color class. |
| Method | Description |
|---|---|
| getAlpha() | Gets the alpha component value of this instance. |
| getRed() | Gets the red component value of this instance. |
| getGreen() | Gets the green component value of this instance. |
| getBlue() | Gets the blue component value of this instance. |
| toString() | Returns a String that represents the current Color . |
| getCore() |
public Color(int alpha, int red, int green, int blue)
Initializes a new instance of the Color class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| alpha | int | The alpha component from 0 to 255. |
| red | int | The red component from 0 to 255. |
| green | int | The green component from 0 to 255. |
| blue | int | The blue component from 0 to 255. |
public Color(int red, int green, int blue)
Initializes a new instance of the Color class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| red | int | The red component from 0 to 255. |
| green | int | The green component from 0 to 255. |
| blue | int | The blue component from 0 to 255. |
public Color(Object data)
Initializes a new instance of the Color class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| data | java.lang.Object | The serialized data. |
public int getAlpha()
Gets the alpha component value of this instance.
Returns: int - The alpha component value of this instance.
public int getRed()
Gets the red component value of this instance.
Returns: int - The red component value of this instance.
public int getGreen()
Gets the green component value of this instance.
Returns: int - The green component value of this instance.
public int getBlue()
Gets the blue component value of this instance.
Returns: int - The blue component value of this instance.
public String toString()
Returns a String that represents the current Color .
Returns: java.lang.String - A String that represents the current Color .
public Object getCore()
Returns: java.lang.Object
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.