| Modifier and Type | Method and Description |
|---|---|
RColor |
copy()
Creates a deep copy of the object.
|
boolean |
equals(RColor other)
Checks if the input color is equal to this object.
|
java.lang.Float |
getAlpha()
Returns the value of alpha / transparency.
|
int |
getColor()
Returns a int representation of the current color.
|
ColorSpace |
getColorSpace()
Returns the color space of the color.
|
java.lang.String |
getHexString()
Returns a String representation of the current color using hexadecimal
numbers.
|
java.lang.String |
getName()
Returns the name of the color space e.g.
|
int |
getOpColor()
Returns a int representation of the current color - but ignoring the
alpha value.
|
java.lang.String |
getOpHexString()
Returns a String representation of the current color using hexadecimal
numbers.
|
float[] |
getValues()
Returns the color values of the current object.
|
float[] |
getValuesNormalized()
Returns the normalized color values of the current object.
|
RColor |
setAlpha(java.lang.Float alpha)
Sets the value of alpha / transparency.
|
HSBColor |
toHSB()
Returns a HSBColor representation of the current color.
|
LabColor |
toLab()
Returns a LabColor representation of the current color.
|
LCHColor |
toLCH()
Returns a LCHColor representation of the current color.
|
RGBColor |
toRGB()
Returns a RGBColor representation of the current color.
|
XYZColor |
toXYZ()
Returns a XYZColor representation of the current color.
|
float[] getValues()
float[] getValuesNormalized()
java.lang.String getHexString()
RGBColor rgb = new RGBColor(255, 0, 128, 0); rgb.getHexString(); // "00FF0080"
java.lang.String getOpHexString()
RGBColor rgb = new RGBColor(255, 0, 128, 0); rgb.getOpHexString(); // "FF0080"
int getOpColor()
HSBColor hsb = new HSBColor(244, 100, 100, 50); fill(hsb.getOpColor());
int getColor()
HSBColor hsb = new HSBColor(244, 100, 100); fill(hsb.getColor());
RColor setAlpha(java.lang.Float alpha)
alpha - The value of the colors transparency.java.lang.Float getAlpha()
ColorSpace getColorSpace()
java.lang.String getName()
RGBColor toRGB()
HSBColor toHSB()
XYZColor toXYZ()
LabColor toLab()
LCHColor toLCH()
RColor copy()
boolean equals(RColor other)
other - The other color