Color

Overview

Color is a class in Aspose.Slides FOSS for Java.

Immutable value type representing an ARGB color.

This class provides 19 methods for working with Color objects in Java programs. Available methods include: Color, a, b, equals, fromArgb, g, getA, getB, getG, getR, hashCode, isEmpty, and 3 additional methods. All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package. Properties: ALICE_BLUE, ANTIQUE_WHITE, AQUA, AQUAMARINE, AZURE, BEIGE, and 141 more.

Properties

NameTypeAccessDescription
aintReadGets the alpha component.
rintReadGets the red component.
gintReadGets the green component.
bintReadGets the blue component.
emptybooleanReadReturns {@code true} if this color is empty (all components are zero).
TRANSPARENTColorReadTransparent (alpha=0, white).
ALICE_BLUEColorReadAliceBlue.
ANTIQUE_WHITEColorReadAntiqueWhite.
AQUAColorReadAqua.
AQUAMARINEColorReadAquamarine.
AZUREColorReadAzure.
BEIGEColorReadBeige.
BISQUEColorReadBisque.
BLACKColorReadBlack.
BLANCHED_ALMONDColorReadBlanchedAlmond.
BLUEColorReadBlue.
BLUE_VIOLETColorReadBlueViolet.
BROWNColorReadBrown.
BURLY_WOODColorReadBurlyWood.
CADET_BLUEColorReadCadetBlue.
CHARTREUSEColorReadChartreuse.
CHOCOLATEColorReadChocolate.
CORALColorReadCoral.
CORNFLOWER_BLUEColorReadCornflowerBlue.
CORNSILKColorReadCornsilk.
CRIMSONColorReadCrimson.
CYANColorReadCyan.
DARK_BLUEColorReadDarkBlue.
DARK_CYANColorReadDarkCyan.
DARK_GOLDENRODColorReadDarkGoldenrod.
DARK_GRAYColorReadDarkGray.
DARK_GREENColorReadDarkGreen.
DARK_KHAKIColorReadDarkKhaki.
DARK_MAGENTAColorReadDarkMagenta.
DARK_OLIVE_GREENColorReadDarkOliveGreen.
DARK_ORANGEColorReadDarkOrange.
DARK_ORCHIDColorReadDarkOrchid.
DARK_REDColorReadDarkRed.
DARK_SALMONColorReadDarkSalmon.
DARK_SEA_GREENColorReadDarkSeaGreen.
DARK_SLATE_BLUEColorReadDarkSlateBlue.
DARK_SLATE_GRAYColorReadDarkSlateGray.
DARK_TURQUOISEColorReadDarkTurquoise.
DARK_VIOLETColorReadDarkViolet.
DEEP_PINKColorReadDeepPink.
DEEP_SKY_BLUEColorReadDeepSkyBlue.
DIM_GRAYColorReadDimGray.
DODGER_BLUEColorReadDodgerBlue.
FIREBRICKColorReadFirebrick.
FLORAL_WHITEColorReadFloralWhite.
FOREST_GREENColorReadForestGreen.
FUCHSIAColorReadFuchsia.
GAINSBOROColorReadGainsboro.
GHOST_WHITEColorReadGhostWhite.
GOLDColorReadGold.
GOLDENRODColorReadGoldenrod.
GRAYColorReadGray.
GREENColorReadGreen.
GREEN_YELLOWColorReadGreenYellow.
HONEYDEWColorReadHoneydew.
HOT_PINKColorReadHotPink.
INDIAN_REDColorReadIndianRed.
INDIGOColorReadIndigo.
IVORYColorReadIvory.
KHAKIColorReadKhaki.
LAVENDERColorReadLavender.
LAVENDER_BLUSHColorReadLavenderBlush.
LAWN_GREENColorReadLawnGreen.
LEMON_CHIFFONColorReadLemonChiffon.
LIGHT_BLUEColorReadLightBlue.
LIGHT_CORALColorReadLightCoral.
LIGHT_CYANColorReadLightCyan.
LIGHT_GOLDENROD_YELLOWColorReadLightGoldenrodYellow.
LIGHT_GRAYColorReadLightGray.
LIGHT_GREENColorReadLightGreen.
LIGHT_PINKColorReadLightPink.
LIGHT_SALMONColorReadLightSalmon.
LIGHT_SEA_GREENColorReadLightSeaGreen.
LIGHT_SKY_BLUEColorReadLightSkyBlue.
LIGHT_SLATE_GRAYColorReadLightSlateGray.
LIGHT_STEEL_BLUEColorReadLightSteelBlue.
LIGHT_YELLOWColorReadLightYellow.
LIMEColorReadLime.
LIME_GREENColorReadLimeGreen.
LINENColorReadLinen.
MAGENTAColorReadMagenta.
MAROONColorReadMaroon.
MEDIUM_AQUAMARINEColorReadMediumAquamarine.
MEDIUM_BLUEColorReadMediumBlue.
MEDIUM_ORCHIDColorReadMediumOrchid.
MEDIUM_PURPLEColorReadMediumPurple.
MEDIUM_SEA_GREENColorReadMediumSeaGreen.
MEDIUM_SLATE_BLUEColorReadMediumSlateBlue.
MEDIUM_SPRING_GREENColorReadMediumSpringGreen.
MEDIUM_TURQUOISEColorReadMediumTurquoise.
MEDIUM_VIOLET_REDColorReadMediumVioletRed.
MIDNIGHT_BLUEColorReadMidnightBlue.
MINT_CREAMColorReadMintCream.
MISTY_ROSEColorReadMistyRose.
MOCCASINColorReadMoccasin.
NAVAJO_WHITEColorReadNavajoWhite.
NAVYColorReadNavy.
OLD_LACEColorReadOldLace.
OLIVEColorReadOlive.
OLIVE_DRABColorReadOliveDrab.
ORANGEColorReadOrange.
ORANGE_REDColorReadOrangeRed.
ORCHIDColorReadOrchid.
PALE_GOLDENRODColorReadPaleGoldenrod.
PALE_GREENColorReadPaleGreen.
PALE_TURQUOISEColorReadPaleTurquoise.
PALE_VIOLET_REDColorReadPaleVioletRed.
PAPAYA_WHIPColorReadPapayaWhip.
PEACH_PUFFColorReadPeachPuff.
PERUColorReadPeru.
PINKColorReadPink.
PLUMColorReadPlum.
POWDER_BLUEColorReadPowderBlue.
PURPLEColorReadPurple.
REDColorReadRed.
ROSY_BROWNColorReadRosyBrown.
ROYAL_BLUEColorReadRoyalBlue.
SADDLE_BROWNColorReadSaddleBrown.
SALMONColorReadSalmon.
SANDY_BROWNColorReadSandyBrown.
SEA_GREENColorReadSeaGreen.
SEA_SHELLColorReadSeaShell.
SIENNAColorReadSienna.
SILVERColorReadSilver.
SKY_BLUEColorReadSkyBlue.
SLATE_BLUEColorReadSlateBlue.
SLATE_GRAYColorReadSlateGray.
SNOWColorReadSnow.
SPRING_GREENColorReadSpringGreen.
STEEL_BLUEColorReadSteelBlue.
TANColorReadTan.
TEALColorReadTeal.
THISTLEColorReadThistle.
TOMATOColorReadTomato.
TURQUOISEColorReadTurquoise.
VIOLETColorReadViolet.
WHEATColorReadWheat.
WHITEColorReadWhite.
WHITE_SMOKEColorReadWhiteSmoke.
YELLOWColorReadYellow.
YELLOW_GREENColorReadYellowGreen.
EMPTYColorReadEmpty (all zeros).

Methods

SignatureDescription
Color(a: int, r: int, g: int, b: int)Initializes a new Color with the specified ARGB components.
Color(r: int, g: int, b: int)Initializes a new Color with the specified RGB components and default alpha of 255.
Color()Initializes a new Color with default ARGB components (opaque black).
a() → intGets the alpha component.
getA() → intGets the alpha component.
r() → intGets the red component.
getR() → intGets the red component.
g() → intGets the green component.
getG() → intGets the green component.
b() → intGets the blue component.
getB() → intGets the blue component.
fromArgb(a: int, r: int, g: int, b: int) → ColorCreates a new Color from the specified ARGB components.
fromArgb(r: int, g: int, b: int) → ColorCreates a new Color from the specified RGB components with alpha 255.
fromArgb(argb: int) → ColorCreates a new Color from a packed 32-bit ARGB value.
toArgb() → intPacks this color into a 32-bit ARGB integer.
isEmpty() → booleanReturns {@code true} if this color is empty (all components are zero).
equals(obj: Object) → boolean
hashCode() → int
toString() → String

See Also

 English