public class JLColor
extends java.lang.Object
| Constructor and Description |
|---|
JLColor(double red,
double green,
double blue)
Constructor which takes intensity values.
|
JLColor(int red,
int green,
int blue)
Constructor which takes standard RGB integer values (0-255)
|
JLColor(long color)
Constructor which takes a standard long color value
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBlue() |
double |
getBlueIntensity() |
int |
getGreen() |
double |
getGreenIntensity() |
int |
getRed() |
double |
getRedIntensity() |
static int |
intensityToValue(double intensity)
Convert a color intensity to a color value
|
void |
setBlue(int blue) |
void |
setBlueIntensity(double intensity) |
void |
setGreen(int green) |
void |
setGreenIntensity(double intensity) |
void |
setRed(int red) |
void |
setRedIntensity(double intensity) |
static double |
valueToIntensity(int value)
Convert a color value to a color intensity
|
public JLColor(int red,
int green,
int blue)
red - The Red component of the colorgreen - The Green component of the colorblue - The Blue component of the colorpublic JLColor(double red,
double green,
double blue)
red - Red intensitygreen - Green intensityblue - Blue intensitypublic JLColor(long color)
color - A long color value to convert to RGBpublic static double valueToIntensity(int value)
value - The color value (0-255)public static int intensityToValue(double intensity)
intensity - The intensity (0.0-100.0)public int getRed()
public double getRedIntensity()
public void setRed(int red)
red - Red valuepublic void setRedIntensity(double intensity)
intensity - Red intensitypublic int getGreen()
public double getGreenIntensity()
public void setGreen(int green)
green - Green valuepublic void setGreenIntensity(double intensity)
intensity - Green intensitypublic int getBlue()
public double getBlueIntensity()
public void setBlue(int blue)
blue - Blue valuepublic void setBlueIntensity(double intensity)
intensity - Blue intensity