public class Color extends Object
Modifier and Type | Field and Description |
---|---|
static Color |
BLACK
Predefined black DeviceRgb color
|
static Color |
BLUE
Predefined blue DeviceRgb color
|
protected PdfColorSpace |
colorSpace
The color space of the color
|
protected float[] |
colorValue
The color value of the color
|
static Color |
CYAN
Predefined cyan DeviceRgb color
|
static Color |
DARK_GRAY
Predefined dark gray DeviceRgb color
|
static Color |
GRAY
Predefined gray DeviceRgb color
|
static Color |
GREEN
Predefined green DeviceRgb color
|
static Color |
LIGHT_GRAY
Predefined light gray DeviceRgb color
|
static Color |
MAGENTA
Predefined magenta DeviceRgb color
|
static Color |
ORANGE
Predefined orange DeviceRgb color
|
static Color |
PINK
Predefined pink DeviceRgb color
|
static Color |
RED
Predefined red DeviceRgb color
|
static Color |
WHITE
Predefined white DeviceRgb color
|
static Color |
YELLOW
Predefined yellow DeviceRgb color
|
Modifier | Constructor and Description |
---|---|
protected |
Color(PdfColorSpace colorSpace, float[] colorValue)
Creates a Color of certain color space and color value.
|
Modifier and Type | Method and Description |
---|---|
static DeviceRgb |
convertCmykToRgb(DeviceCmyk cmykColor)
Converts DeviceCmyk color to DeviceRgb color
|
static DeviceCmyk |
convertRgbToCmyk(DeviceRgb rgbColor)
Converts DeviceRgb color to DeviceCmyk color
|
boolean |
equals(Object o)
Indicates whether the color is equal to the given color.
|
PdfColorSpace |
getColorSpace()
Returns the color space to which the color is related.
|
float[] |
getColorValue()
Returns the color value of the color
|
int |
getNumberOfComponents()
Returns the number of color value components
|
int |
hashCode() |
static Color |
makeColor(PdfColorSpace colorSpace)
Makes a Color of certain color space.
|
static Color |
makeColor(PdfColorSpace colorSpace, float[] colorValue)
Makes a Color of certain color space and color value.
|
void |
setColorValue(float[] value)
Sets the color value of the color
|
public static final Color BLACK
public static final Color BLUE
public static final Color CYAN
public static final Color DARK_GRAY
public static final Color GRAY
public static final Color GREEN
public static final Color LIGHT_GRAY
public static final Color MAGENTA
public static final Color ORANGE
public static final Color PINK
public static final Color RED
public static final Color WHITE
public static final Color YELLOW
protected PdfColorSpace colorSpace
protected float[] colorValue
protected Color(PdfColorSpace colorSpace, float[] colorValue)
colorSpace
- the color space to which the created Color object relates
colorValue
- the color value of the created Color object
public static Color makeColor(PdfColorSpace colorSpace)
colorSpace
- the color space to which the returned Color object relates
public static Color makeColor(PdfColorSpace colorSpace, float[] colorValue)
colorSpace
- the color space to which the returned Color object relates
colorValue
- the color value of the returned Color object
public static DeviceRgb convertCmykToRgb(DeviceCmyk cmykColor)
DeviceCmyk
color to DeviceRgb
color
cmykColor
- the DeviceCmyk color which will be converted to DeviceRgb color
public static DeviceCmyk convertRgbToCmyk(DeviceRgb rgbColor)
DeviceRgb
color to DeviceCmyk
color
rgbColor
- the DeviceRgb color which will be converted to DeviceCmyk color
public int getNumberOfComponents()
public PdfColorSpace getColorSpace()
color space
to which the color is related.
public float[] getColorValue()
public void setColorValue(float[] value)
value
- new color value
public boolean equals(Object o)
color space
and color value
are considered during the comparison.
Copyright © 1998–2016 iText Group NV. All rights reserved.