public class Color
extends java.lang.Object
| Constructor and Description |
|---|
Color(ColorSpace colorSpace,
java.util.List<java.lang.Double> values)
Create a new color in an arbitrary color space.
|
Color(double grey)
Create a new color in the DeviceGray colorspace with the specified value.
|
Color(double r,
double g,
double b)
Create a new color in the DeviceRGB colorspace with the specified value.
|
Color(double c,
double m,
double y,
double k)
Create a new color in the DeviceCMYK colorspace with the specified value.
|
Color(Pattern pattern)
Create a new color in the pattern color space.
|
| Modifier and Type | Method and Description |
|---|---|
static Color |
colorFromAWTColor(java.awt.Color c)
Create a Color from a standard java.awt.Color object.
|
void |
delete() |
boolean |
equals(java.lang.Object rhs) |
Pattern |
getPattern()
The pattern of the color
|
ColorSpace |
getSpace()
The color space of the color
|
java.util.List<java.lang.Double> |
getValue()
The values of the color.
|
java.lang.String |
toString()
a string representing the color.
|
public Color(double grey)
grey - the grayscale color value for the new color (0.0 - 1.0)public Color(double r,
double g,
double b)
r - the red color value for the new color (0.0 - 1.0)g - the green color value for the new color (0.0 - 1.0)b - the blue color value for the new color (0.0 - 1.0)public Color(double c,
double m,
double y,
double k)
c - the cyan color value for the new color (0.0 - 1.0)m - the magenta color value for the new color (0.0 - 1.0)y - the yellow color value for the new color (0.0 - 1.0)k - the black color value for the new color (0.0 - 1.0)public Color(ColorSpace colorSpace, java.util.List<java.lang.Double> values)
colorSpace - the color space in which to create the colorvalues - the values to place into the colorpublic Color(Pattern pattern)
pattern - The pattern to turn into a colorpublic void delete()
public static Color colorFromAWTColor(java.awt.Color c)
c - the java.awt.Color object to use as a sourcepublic boolean equals(java.lang.Object rhs)
equals in class java.lang.Objectpublic java.util.List<java.lang.Double> getValue()
public ColorSpace getSpace()
public java.lang.String toString()
toString in class java.lang.Objectpublic Pattern getPattern()