Package com.datalogics.PDFL
Class Color
java.lang.Object
com.datalogics.PDFL.Color
A color specified by values appropriate for its color space. The values that are offered range from 0 to 1.0 for red, green, and blue (RGB) or cyan, magenta, yellow, and black (CYMK).
-
Constructor Summary
ConstructorsConstructorDescriptionColor(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(ColorSpace colorSpace, List<Double> values) Create a new color in an arbitrary color space.Create a new color in the pattern color space. -
Method Summary
-
Constructor Details
-
Color
public Color(double grey) Create a new color in the DeviceGray colorspace with the specified value.- Parameters:
grey- the grayscale color value for the new color (0.0 - 1.0)
-
Color
public Color(double r, double g, double b) Create a new color in the DeviceRGB colorspace with the specified value.- Parameters:
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)
-
Color
public Color(double c, double m, double y, double k) Create a new color in the DeviceCMYK colorspace with the specified value.- Parameters:
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)
-
Color
Create a new color in an arbitrary color space. The number of values passed must match the number of values in the color space.- Parameters:
colorSpace- the color space in which to create the colorvalues- the values to place into the color
-
Color
Create a new color in the pattern color space.- Parameters:
pattern- The pattern to turn into a color
-
-
Method Details
-
delete
public void delete() -
colorFromAWTColor
Create a Color from a standard java.awt.Color object.- Parameters:
c- the java.awt.Color object to use as a source
-
equals
-
getValue
The values of the color. Not valid for pattern-based colors. -
getSpace
The color space of the color -
toString
a string representing the color. -
getPattern
The pattern of the color
-