Color
Inheritance: java.lang.Object
public class Color
Represents an ARGB (alpha, red, green, blue) color.
Constructors
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. |
Methods
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() |
Color(int alpha, int red, int green, int blue)
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. |
Color(int red, int green, int blue)
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. |
Color(Object data)
public Color(Object data)
Initializes a new instance of the Color class.
Parameters:
Parameter | Type | Description |
---|---|---|
data | java.lang.Object | The serialized data. |
getAlpha()
public int getAlpha()
Gets the alpha component value of this instance.
Returns: int - The alpha component value of this instance.
getRed()
public int getRed()
Gets the red component value of this instance.
Returns: int - The red component value of this instance.
getGreen()
public int getGreen()
Gets the green component value of this instance.
Returns: int - The green component value of this instance.
getBlue()
public int getBlue()
Gets the blue component value of this instance.
Returns: int - The blue component value of this instance.
toString()
public String toString()
Returns a String that represents the current Color .
Returns: java.lang.String - A String that represents the current Color .
getCore()
public Object getCore()
Returns: java.lang.Object