Package com.itextpdf.text
Class BaseColor
java.lang.Object
com.itextpdf.text.BaseColor
- Direct Known Subclasses:
ExtendedColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BaseColor
static final BaseColor
static final BaseColor
static final BaseColor
private static final double
static final BaseColor
static final BaseColor
static final BaseColor
static final BaseColor
static final BaseColor
static final BaseColor
static final BaseColor
private int
static final BaseColor
static final BaseColor
-
Constructor Summary
ConstructorsConstructorDescriptionBaseColor
(float red, float green, float blue) Construct a BaseColor with float values.BaseColor
(float red, float green, float blue, float alpha) Construct a BaseColor with float values.BaseColor
(int argb) Construct a BaseColor by setting the combined value.BaseColor
(int red, int green, int blue) BaseColor
(int red, int green, int blue, int alpha) Construct a new BaseColor. -
Method Summary
Modifier and TypeMethodDescriptionbrighter()
Make this BaseColor brighter.darker()
Make this color darker.boolean
int
getAlpha()
int
getBlue()
int
getGreen()
int
getRed()
int
getRGB()
int
hashCode()
protected void
setValue
(int red, int green, int blue, int alpha) toString()
private static void
validate
(int value)
-
Field Details
-
WHITE
-
LIGHT_GRAY
-
GRAY
-
DARK_GRAY
-
BLACK
-
RED
-
PINK
-
ORANGE
-
YELLOW
-
GREEN
-
MAGENTA
-
CYAN
-
BLUE
-
FACTOR
private static final double FACTOR- See Also:
-
value
private int value
-
-
Constructor Details
-
BaseColor
public BaseColor(int red, int green, int blue, int alpha) Construct a new BaseColor.- Parameters:
red
- the value for the red gammagreen
- the value for the green gammablue
- the value for the blue gammaalpha
- the value for the alpha gamma
-
BaseColor
public BaseColor(int red, int green, int blue) - Parameters:
red
-green
-blue
-
-
BaseColor
public BaseColor(float red, float green, float blue, float alpha) Construct a BaseColor with float values.- Parameters:
red
-green
-blue
-alpha
-
-
BaseColor
public BaseColor(float red, float green, float blue) Construct a BaseColor with float values.- Parameters:
red
-green
-blue
-
-
BaseColor
public BaseColor(int argb) Construct a BaseColor by setting the combined value.- Parameters:
argb
-
-
-
Method Details
-
getRGB
public int getRGB()- Returns:
- the combined color value
-
getRed
public int getRed()- Returns:
- the value for red
-
getGreen
public int getGreen()- Returns:
- the value for green
-
getBlue
public int getBlue()- Returns:
- the value for blue
-
getAlpha
public int getAlpha()- Returns:
- the value for the alpha channel
-
brighter
Make this BaseColor brighter. Factor used is 0.7.- Returns:
- the new BaseColor
-
darker
Make this color darker. Factor used is 0.7- Returns:
- the new BaseColor
-
equals
-
hashCode
public int hashCode() -
setValue
protected void setValue(int red, int green, int blue, int alpha) -
validate
private static void validate(int value) -
toString
-