public class Color extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
double |
alpha
The alpha value (for transparency).
|
int |
blue
The blue value.
|
int |
green
The green value.
|
int |
red
The red value.
|
| Constructor and Description |
|---|
Color(int red,
int green,
int blue)
Creates a new color.
|
Color(int red,
int green,
int blue,
double alpha)
Creates a new color.
|
Color(String hexValue)
Creates a new color.
|
| Modifier and Type | Method and Description |
|---|---|
Color |
alpha(double alpha)
Sets the alpha value.
|
Color |
blue(int blue)
Sets the blue value.
|
double |
getAlpha()
Returns the alpha value.
|
int |
getBlue()
Returns the blue value.
|
int |
getGreen()
Returns the green value.
|
int |
getRed()
Returns the red value.
|
Color |
green(int green)
Sets the green value.
|
Color |
red(int red)
Sets the red value.
|
String |
renderJs() |
void |
setAlpha(double alpha)
Sets the alpha value.
|
void |
setBlue(int blue)
Sets the blue value.
|
void |
setGreen(int green)
Sets the green value.
|
void |
setRed(int red)
Sets the red value.
|
String |
toString() |
public int red
public int green
public int blue
public double alpha
public Color(String hexValue)
hexValue - The hexadecimal color code used to populate the color values.public Color(int red,
int green,
int blue)
red - The red valuegreen - The green valueblue - The blue valuepublic Color(int red,
int green,
int blue,
double alpha)
red - The red valuegreen - The green valueblue - The blue valuealpha - The alpha valuepublic int getRed()
public void setRed(int red)
red - New valuepublic Color red(int red)
red - New valuepublic int getGreen()
public void setGreen(int green)
green - New valuepublic Color green(int green)
green - int with the new valuepublic int getBlue()
public void setBlue(int blue)
blue - New valuepublic Color blue(int blue)
blue - New valuepublic double getAlpha()
public void setAlpha(double alpha)
alpha - New valuepublic Color alpha(double alpha)
alpha - New instancepublic String renderJs()
Copyright © 2014–2017. All rights reserved.