public class Color extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected PdfColorSpace |
colorSpace
The color space of the color
|
protected float[] |
colorValue
The color value of the 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
|
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–2020 iText Group NV. All rights reserved.