public class Color extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static Color |
BLACK
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.BLACK instead.
|
static Color |
BLUE
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.BLUE instead.
|
protected PdfColorSpace |
colorSpace
The color space of the color
|
protected float[] |
colorValue
The color value of the color
|
static Color |
CYAN
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.CYAN instead.
|
static Color |
DARK_GRAY
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.DARK_GRAY instead.
|
static Color |
GRAY
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.GRAY instead.
|
static Color |
GREEN
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.GREEN instead.
|
static Color |
LIGHT_GRAY
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.LIGHT_GRAY instead.
|
static Color |
MAGENTA
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.MAGENTA instead.
|
static Color |
ORANGE
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.ORANGE instead.
|
static Color |
PINK
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.PINK instead.
|
static Color |
RED
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.RED instead.
|
static Color |
WHITE
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.WHITE instead.
|
static Color |
YELLOW
Deprecated.
Will be removed in iText 7.1 Use
ColorConstants.YELLOW instead.
|
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
|
@Deprecated public static final Color BLACK
ColorConstants.BLACK
instead.
@Deprecated public static final Color BLUE
ColorConstants.BLUE
instead.
@Deprecated public static final Color CYAN
ColorConstants.CYAN
instead.
@Deprecated public static final Color DARK_GRAY
ColorConstants.DARK_GRAY
instead.
@Deprecated public static final Color GRAY
ColorConstants.GRAY
instead.
@Deprecated public static final Color GREEN
ColorConstants.GREEN
instead.
@Deprecated public static final Color LIGHT_GRAY
ColorConstants.LIGHT_GRAY
instead.
@Deprecated public static final Color MAGENTA
ColorConstants.MAGENTA
instead.
@Deprecated public static final Color ORANGE
ColorConstants.ORANGE
instead.
@Deprecated public static final Color PINK
ColorConstants.PINK
instead.
@Deprecated public static final Color RED
ColorConstants.RED
instead.
@Deprecated public static final Color WHITE
ColorConstants.WHITE
instead.
@Deprecated public static final Color YELLOW
ColorConstants.YELLOW
instead.
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–2018 iText Group NV. All rights reserved.