Colors are handled by a Color base class. Colors can be of the following types:
- CMYK - Specified with C, M, Y, and K color values
- RGB - Specified with R, G, and B color values
- Web - Specified with the Web color format (i.e. "#FF0080" or "aqua")
- Grayscale - Specified as a level of gray
Examples for creating color objects:
[Java]
CmykColor cmykColor = new CmykColor(0.5f, 0.3f, 0.6f, 0.0f);
RgbColor rgbColor = new RgbColor(0.5f, 0.3f, 0.6f);
WebColor webColor1 = new WebColor("#FF0080");
WebColor webColor2 = new WebColor("aqua");
Grayscale grayscale = new Grayscale(0.3f);
Predefined Colors
The color class includes over 140 predefined colors accessed through static property of the Color class by color name. These names correspond with the colors commonly used in web development. These can also be specified by name in the constructor of the WebColor class or from within an HtmlTextArea.
See Also
CmykColor Class | Color Class | Grayscale Class | RgbColor Class | WebColor Class | DynamicPDF GeneratorJava: Getting Started
