Color
Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct
All Implemented Interfaces: java.io.Serializable
public class Color extends Struct<Color> implements Serializable
The color of the pixel.
Constructors
Constructor | Description |
---|---|
Color() |
Methods
Method | Description |
---|---|
getEmpty() | Gets an empty Color . |
getTransparent() | Gets a system-defined color. |
getAliceBlue() | Gets a system-defined color. |
getAntiqueWhite() | Gets a system-defined color. |
getAqua() | Gets a system-defined color. |
getAquamarine() | Gets a system-defined color. |
getAzure() | Gets a system-defined color. |
getBeige() | Gets a system-defined color. |
getBisque() | Gets a system-defined color. |
getBlack() | Gets a system-defined color. |
getBlanchedAlmond() | Gets a system-defined color. |
getBlue() | Gets a system-defined color. |
getBlueViolet() | Gets a system-defined color. |
getBrown() | Gets a system-defined color. |
getBurlyWood() | Gets a system-defined color. |
getCadetBlue() | Gets a system-defined color. |
getChartreuse() | Gets a system-defined color. |
getChocolate() | Gets a system-defined color. |
getCoral() | Gets a system-defined color. |
getCornflowerBlue() | Gets a system-defined color. |
getCornsilk() | Gets a system-defined color. |
getCrimson() | Gets a system-defined color. |
getCyan() | Gets a system-defined color. |
getDarkBlue() | Gets a system-defined color. |
getDarkCyan() | Gets a system-defined color. |
getDarkGoldenrod() | Gets a system-defined color. |
getDarkGray() | Gets a system-defined color. |
getDarkGreen() | Gets a system-defined color. |
getDarkKhaki() | Gets a system-defined color. |
getDarkMagenta() | Gets a system-defined color. |
getDarkOliveGreen() | Gets a system-defined color. |
getDarkOrange() | Gets a system-defined color. |
getDarkOrchid() | Gets a system-defined color. |
getDarkRed() | Gets a system-defined color. |
getDarkSalmon() | Gets a system-defined color. |
getDarkSeaGreen() | Gets a system-defined color. |
getDarkSlateBlue() | Gets a system-defined color. |
getDarkSlateGray() | Gets a system-defined color. |
getDarkTurquoise() | Gets a system-defined color. |
getDarkViolet() | Gets a system-defined color. |
getDeepPink() | Gets a system-defined color. |
getDeepSkyBlue() | Gets a system-defined color. |
getDimGray() | Gets a system-defined color. |
getDodgerBlue() | Gets a system-defined color. |
getFirebrick() | Gets a system-defined color. |
getFloralWhite() | Gets a system-defined color. |
getForestGreen() | Gets a system-defined color. |
getFuchsia() | Gets a system-defined color. |
getGainsboro() | Gets a system-defined color. |
getGhostWhite() | Gets a system-defined color. |
getGold() | Gets a system-defined color. |
getGoldenrod() | Gets a system-defined color. |
getGray() | Gets a system-defined color. |
getGreen() | Gets a system-defined color. |
getGreenYellow() | Gets a system-defined color. |
getHoneydew() | Gets a system-defined color. |
getHotPink() | Gets a system-defined color. |
getIndianRed() | Gets a system-defined color. |
getIndigo() | Gets a system-defined color. |
getIvory() | Gets a system-defined color. |
getKhaki() | Gets a system-defined color. |
getLavender() | Gets a system-defined color. |
getLavenderBlush() | Gets a system-defined color. |
getLawnGreen() | Gets a system-defined color. |
getLemonChiffon() | Gets a system-defined color. |
getLightBlue() | Gets a system-defined color. |
getLightCoral() | Gets a system-defined color. |
getLightCyan() | Gets a system-defined color. |
getLightGoldenrodYellow() | Gets a system-defined color. |
getLightGreen() | Gets a system-defined color. |
getLightGray() | Gets a system-defined color. |
getLightPink() | Gets a system-defined color. |
getLightSalmon() | Gets a system-defined color. |
getLightSeaGreen() | Gets a system-defined color. |
getLightSkyBlue() | Gets a system-defined color. |
getLightSlateGray() | Gets a system-defined color. |
getLightSteelBlue() | Gets a system-defined color. |
getLightYellow() | Gets a system-defined color. |
getLime() | Gets a system-defined color. |
getLimeGreen() | Gets a system-defined color. |
getLinen() | Gets a system-defined color. |
getMagenta() | Gets a system-defined color. |
getMaroon() | Gets a system-defined color. |
getMediumAquamarine() | Gets a system-defined color. |
getMediumBlue() | Gets a system-defined color. |
getMediumOrchid() | Gets a system-defined color. |
getMediumPurple() | Gets a system-defined color. |
getMediumSeaGreen() | Gets a system-defined color. |
getMediumSlateBlue() | Gets a system-defined color. |
getMediumSpringGreen() | Gets a system-defined color. |
getMediumTurquoise() | Gets a system-defined color. |
getMediumVioletRed() | Gets a system-defined color. |
getMidnightBlue() | Gets a system-defined color. |
getMintCream() | Gets a system-defined color. |
getMistyRose() | Gets a system-defined color. |
getMoccasin() | Gets a system-defined color. |
getNavajoWhite() | Gets a system-defined color. |
getNavy() | Gets a system-defined color. |
getOldLace() | Gets a system-defined color. |
getOlive() | Gets a system-defined color. |
getOliveDrab() | Gets a system-defined color. |
getOrange() | Gets a system-defined color. |
getOrangeRed() | Gets a system-defined color. |
getOrchid() | Gets a system-defined color. |
getPaleGoldenrod() | Gets a system-defined color. |
getPaleGreen() | Gets a system-defined color. |
getPaleTurquoise() | Gets a system-defined color. |
getPaleVioletRed() | Gets a system-defined color. |
getPapayaWhip() | Gets a system-defined color. |
getPeachPuff() | Gets a system-defined color. |
getPeru() | Gets a system-defined color. |
getPink() | Gets a system-defined color. |
getPlum() | Gets a system-defined color. |
getPowderBlue() | Gets a system-defined color. |
getPurple() | Gets a system-defined color. |
getRed() | Gets a system-defined color. |
getRosyBrown() | Gets a system-defined color. |
getRoyalBlue() | Gets a system-defined color. |
getSaddleBrown() | Gets a system-defined color. |
getSalmon() | Gets a system-defined color. |
getSandyBrown() | Gets a system-defined color. |
getSeaGreen() | Gets a system-defined color. |
getSeaShell() | Gets a system-defined color. |
getSienna() | Gets a system-defined color. |
getSilver() | Gets a system-defined color. |
getSkyBlue() | Gets a system-defined color. |
getSlateBlue() | Gets a system-defined color. |
getSlateGray() | Gets a system-defined color. |
getSnow() | Gets a system-defined color. |
getSpringGreen() | Gets a system-defined color. |
getSteelBlue() | Gets a system-defined color. |
getTan() | Gets a system-defined color. |
getTeal() | Gets a system-defined color. |
getThistle() | Gets a system-defined color. |
getTomato() | Gets a system-defined color. |
getTurquoise() | Gets a system-defined color. |
getViolet() | Gets a system-defined color. |
getWheat() | Gets a system-defined color. |
getWhite() | Gets a system-defined color. |
getWhiteSmoke() | Gets a system-defined color. |
getYellow() | Gets a system-defined color. |
getYellowGreen() | Gets a system-defined color. |
op_Equality(Color left, Color right) | Tests whether two specified com.aspose.imaging.Color structures are equivalent. |
op_Inequality(Color left, Color right) | Tests whether two specified com.aspose.imaging.Color structures are different. |
fromArgb(int argb) | Creates a com.aspose.imaging.Color structure from a 32-bit ARGB value. |
fromArgb(int alpha, int red, int green, int blue) | Creates a com.aspose.imaging.Color structure from the four ARGB component (alpha, red, green, and blue) values. |
fromArgb(byte alpha, byte red, byte green, byte blue) | Creates a com.aspose.imaging.Color structure from the four ARGB component (alpha, red, green, and blue) values. |
fromArgb(int alpha, Color baseColor) | Creates a com.aspose.imaging.Color structure from the specified com.aspose.imaging.Color structure, but with the new specified alpha value. |
fromArgb(int red, int green, int blue) | Creates a com.aspose.imaging.Color structure from the specified 8-bit color values (red, green, and blue). |
fromArgb(byte red, byte green, byte blue) | Creates a com.aspose.imaging.Color structure from the specified 8-bit color values (red, green, and blue). |
fromKnownColor(int color) | Creates a com.aspose.imaging.Color structure from the specified predefined color. |
fromName(String name) | Creates a com.aspose.imaging.Color structure from the specified name of a predefined color. |
toCmyk(Color[] pixels) | The conversion from Color to CMYKColor. |
toCmyk(Color pixel) | The conversion from Color to CMYKColor. |
toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream) | The conversion from Color to CMYKColor using icc conversion with default profiles. |
toCmykIcc(Color pixel) | The conversion from Color to CMYKColor using icc conversion with default profiles. |
toCmykIcc(Color[] pixels) | The conversion from Color to CMYKColor using icc conversion with default profiles. |
toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream) | The conversion from Color to CMYKColor using icc conversion. |
isEquals(Color obj1, Color obj2) | |
getR() | Gets the red component value of this com.aspose.imaging.Color structure. |
getG() | Gets the green component value of this com.aspose.imaging.Color structure. |
getB() | Gets the blue component value of this com.aspose.imaging.Color structure. |
getA() | Gets the alpha component value of this com.aspose.imaging.Color structure. |
isKnownColor() | Gets a value indicating whether this com.aspose.imaging.Color structure is a predefined color. |
isEmpty() | Gets a value indicating whether this com.aspose.imaging.Color structure is uninitialized. |
isNamedColor() | Gets a value indicating whether this com.aspose.imaging.Color structure is a named color or a member of the Aspose.Imaging.KnownColor enumeration. |
getName() | Gets the name of this com.aspose.imaging.Color . |
getBrightness() | Gets the hue-saturation-brightness (HSB) brightness value for this com.aspose.imaging.Color structure. |
getHue() | Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this com.aspose.imaging.Color structure. |
getSaturation() | Gets the hue-saturation-brightness (HSB) saturation value for this com.aspose.imaging.Color structure. |
toArgb() | Gets the 32-bit ARGB value of this com.aspose.imaging.Color structure. |
toKnownColor() | Gets the Aspose.Imaging.KnownColor value of this com.aspose.imaging.Color structure. |
toString() | Converts this com.aspose.imaging.Color structure to a human-readable string. |
equals(Object obj) | Tests whether the specified object is a com.aspose.imaging.Color structure and is equivalent to this com.aspose.imaging.Color structure. |
hashCode() | Returns a hash code for this com.aspose.imaging.Color structure. |
CloneTo(Color that) | |
Clone() |
Color()
public Color()
getEmpty()
public static Color getEmpty()
Gets an empty Color
.
Returns:
Color - The empty Color
.
getTransparent()
public static Color getTransparent()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getAliceBlue()
public static Color getAliceBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getAntiqueWhite()
public static Color getAntiqueWhite()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getAqua()
public static Color getAqua()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getAquamarine()
public static Color getAquamarine()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getAzure()
public static Color getAzure()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBeige()
public static Color getBeige()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBisque()
public static Color getBisque()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBlack()
public static Color getBlack()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBlanchedAlmond()
public static Color getBlanchedAlmond()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBlue()
public static Color getBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBlueViolet()
public static Color getBlueViolet()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBrown()
public static Color getBrown()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getBurlyWood()
public static Color getBurlyWood()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getCadetBlue()
public static Color getCadetBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getChartreuse()
public static Color getChartreuse()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getChocolate()
public static Color getChocolate()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getCoral()
public static Color getCoral()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getCornflowerBlue()
public static Color getCornflowerBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getCornsilk()
public static Color getCornsilk()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getCrimson()
public static Color getCrimson()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getCyan()
public static Color getCyan()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkBlue()
public static Color getDarkBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkCyan()
public static Color getDarkCyan()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkGoldenrod()
public static Color getDarkGoldenrod()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkGray()
public static Color getDarkGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkGreen()
public static Color getDarkGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkKhaki()
public static Color getDarkKhaki()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkMagenta()
public static Color getDarkMagenta()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkOliveGreen()
public static Color getDarkOliveGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkOrange()
public static Color getDarkOrange()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkOrchid()
public static Color getDarkOrchid()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkRed()
public static Color getDarkRed()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkSalmon()
public static Color getDarkSalmon()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkSeaGreen()
public static Color getDarkSeaGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkSlateBlue()
public static Color getDarkSlateBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkSlateGray()
public static Color getDarkSlateGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkTurquoise()
public static Color getDarkTurquoise()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDarkViolet()
public static Color getDarkViolet()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDeepPink()
public static Color getDeepPink()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDeepSkyBlue()
public static Color getDeepSkyBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDimGray()
public static Color getDimGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getDodgerBlue()
public static Color getDodgerBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getFirebrick()
public static Color getFirebrick()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getFloralWhite()
public static Color getFloralWhite()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getForestGreen()
public static Color getForestGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getFuchsia()
public static Color getFuchsia()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getGainsboro()
public static Color getGainsboro()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getGhostWhite()
public static Color getGhostWhite()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getGold()
public static Color getGold()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getGoldenrod()
public static Color getGoldenrod()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getGray()
public static Color getGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
structure representing a system-defined color.
getGreen()
public static Color getGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getGreenYellow()
public static Color getGreenYellow()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getHoneydew()
public static Color getHoneydew()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getHotPink()
public static Color getHotPink()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getIndianRed()
public static Color getIndianRed()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getIndigo()
public static Color getIndigo()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getIvory()
public static Color getIvory()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getKhaki()
public static Color getKhaki()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLavender()
public static Color getLavender()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLavenderBlush()
public static Color getLavenderBlush()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLawnGreen()
public static Color getLawnGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLemonChiffon()
public static Color getLemonChiffon()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightBlue()
public static Color getLightBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightCoral()
public static Color getLightCoral()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightCyan()
public static Color getLightCyan()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightGoldenrodYellow()
public static Color getLightGoldenrodYellow()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightGreen()
public static Color getLightGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightGray()
public static Color getLightGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightPink()
public static Color getLightPink()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightSalmon()
public static Color getLightSalmon()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightSeaGreen()
public static Color getLightSeaGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightSkyBlue()
public static Color getLightSkyBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightSlateGray()
public static Color getLightSlateGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightSteelBlue()
public static Color getLightSteelBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLightYellow()
public static Color getLightYellow()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLime()
public static Color getLime()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLimeGreen()
public static Color getLimeGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getLinen()
public static Color getLinen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMagenta()
public static Color getMagenta()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMaroon()
public static Color getMaroon()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumAquamarine()
public static Color getMediumAquamarine()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumBlue()
public static Color getMediumBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumOrchid()
public static Color getMediumOrchid()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumPurple()
public static Color getMediumPurple()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumSeaGreen()
public static Color getMediumSeaGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumSlateBlue()
public static Color getMediumSlateBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumSpringGreen()
public static Color getMediumSpringGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumTurquoise()
public static Color getMediumTurquoise()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMediumVioletRed()
public static Color getMediumVioletRed()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMidnightBlue()
public static Color getMidnightBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMintCream()
public static Color getMintCream()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMistyRose()
public static Color getMistyRose()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getMoccasin()
public static Color getMoccasin()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getNavajoWhite()
public static Color getNavajoWhite()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getNavy()
public static Color getNavy()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getOldLace()
public static Color getOldLace()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getOlive()
public static Color getOlive()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getOliveDrab()
public static Color getOliveDrab()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getOrange()
public static Color getOrange()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getOrangeRed()
public static Color getOrangeRed()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getOrchid()
public static Color getOrchid()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPaleGoldenrod()
public static Color getPaleGoldenrod()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPaleGreen()
public static Color getPaleGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPaleTurquoise()
public static Color getPaleTurquoise()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPaleVioletRed()
public static Color getPaleVioletRed()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPapayaWhip()
public static Color getPapayaWhip()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPeachPuff()
public static Color getPeachPuff()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPeru()
public static Color getPeru()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPink()
public static Color getPink()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPlum()
public static Color getPlum()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPowderBlue()
public static Color getPowderBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getPurple()
public static Color getPurple()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getRed()
public static Color getRed()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getRosyBrown()
public static Color getRosyBrown()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getRoyalBlue()
public static Color getRoyalBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSaddleBrown()
public static Color getSaddleBrown()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSalmon()
public static Color getSalmon()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSandyBrown()
public static Color getSandyBrown()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSeaGreen()
public static Color getSeaGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSeaShell()
public static Color getSeaShell()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSienna()
public static Color getSienna()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSilver()
public static Color getSilver()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSkyBlue()
public static Color getSkyBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSlateBlue()
public static Color getSlateBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSlateGray()
public static Color getSlateGray()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSnow()
public static Color getSnow()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSpringGreen()
public static Color getSpringGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getSteelBlue()
public static Color getSteelBlue()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getTan()
public static Color getTan()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getTeal()
public static Color getTeal()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getThistle()
public static Color getThistle()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getTomato()
public static Color getTomato()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getTurquoise()
public static Color getTurquoise()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getViolet()
public static Color getViolet()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getWheat()
public static Color getWheat()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getWhite()
public static Color getWhite()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getWhiteSmoke()
public static Color getWhiteSmoke()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getYellow()
public static Color getYellow()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
getYellowGreen()
public static Color getYellowGreen()
Gets a system-defined color.
Returns:
Color - A com.aspose.imaging.Color
representing a system-defined color.
op_Equality(Color left, Color right)
public static boolean op_Equality(Color left, Color right)
Tests whether two specified com.aspose.imaging.Color
structures are equivalent.
Parameters:
Parameter | Type | Description |
---|---|---|
left | Color | The com.aspose.imaging.Color that is to the left of the equality operator. |
right | Color | The com.aspose.imaging.Color that is to the right of the equality operator. |
Returns:
boolean - True if the two com.aspose.imaging.Color
structures are equal; otherwise, false.
op_Inequality(Color left, Color right)
public static boolean op_Inequality(Color left, Color right)
Tests whether two specified com.aspose.imaging.Color
structures are different.
Parameters:
Parameter | Type | Description |
---|---|---|
left | Color | The com.aspose.imaging.Color that is to the left of the inequality operator. |
right | Color | The com.aspose.imaging.Color that is to the right of the inequality operator. |
Returns:
boolean - True if the two com.aspose.imaging.Color
structures are different; otherwise, false.
fromArgb(int argb)
public static Color fromArgb(int argb)
Creates a com.aspose.imaging.Color
structure from a 32-bit ARGB value.
Parameters:
Parameter | Type | Description |
---|---|---|
argb | int | A value specifying the 32-bit ARGB value. |
Returns:
Color - The com.aspose.imaging.Color
structure that this method creates.
fromArgb(int alpha, int red, int green, int blue)
public static Color fromArgb(int alpha, int red, int green, int blue)
Creates a com.aspose.imaging.Color
structure from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
Parameters:
Parameter | Type | Description |
---|---|---|
alpha | int | The alpha component. Valid values are 0 through 255. |
red | int | The red component. Valid values are 0 through 255. |
green | int | The green component. Valid values are 0 through 255. |
blue | int | The blue component. Valid values are 0 through 255. |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
Example: The following example creates a new raster image, saves the specified semi-transparent pixels, then loads those pixels and gets final colors in the premultiplied form.
int imageWidth = 3;
int imageHeight = 2;
com.aspose.imaging.Color[] colors = new com.aspose.imaging.Color[]
{
com.aspose.imaging.Color.fromArgb(127, 255, 0, 0),
com.aspose.imaging.Color.fromArgb(127, 0, 255, 0),
com.aspose.imaging.Color.fromArgb(127, 0, 0, 255),
com.aspose.imaging.Color.fromArgb(127, 255, 255, 0),
com.aspose.imaging.Color.fromArgb(127, 255, 0, 255),
com.aspose.imaging.Color.fromArgb(127, 0, 255, 255),
};
com.aspose.imaging.imageoptions.PngOptions createOptions = new com.aspose.imaging.imageoptions.PngOptions();
createOptions.setSource(new com.aspose.imaging.sources.StreamSource(new com.aspose.imaging.system.io.MemoryStream(), true));
createOptions.setColorType(com.aspose.imaging.fileformats.png.PngColorType.TruecolorWithAlpha);
com.aspose.imaging.Image image = com.aspose.imaging.Image.create(createOptions, imageWidth, imageHeight);
try {
com.aspose.imaging.RasterImage rasterImage = (com.aspose.imaging.RasterImage) image;
// Save pixels for the whole image.
rasterImage.savePixels(rasterImage.getBounds(), colors);
// The pixels are stored in the original image in the non-premultiplied form.
// Need to specify the corresponding option explicitly to obtain premultiplied color components.
// The premultiplied color components are calculated by the formulas:
// red = original_red * alpha / 255;
// green = original_green * alpha / 255;
// blue = original_blue * alpha / 255;
rasterImage.setPremultiplyComponents(true);
com.aspose.imaging.Color[] premultipliedColors = rasterImage.loadPixels(rasterImage.getBounds());
for (int i = 0; i < colors.length; i++) {
System.out.println("Original color: " + colors[i].toString());
System.out.println("Premultiplied color: " + premultipliedColors[i].toString());
}
} finally {
image.dispose();
}
fromArgb(byte alpha, byte red, byte green, byte blue)
public static Color fromArgb(byte alpha, byte red, byte green, byte blue)
Creates a com.aspose.imaging.Color
structure from the four ARGB component (alpha, red, green, and blue) values. Although this method allows a 32-bit value to be passed for each component, the value of each component is limited to 8 bits.
Parameters:
Parameter | Type | Description |
---|---|---|
alpha | byte | The alpha component. Valid values are 0 through 255. |
red | byte | The red component. Valid values are 0 through 255. |
green | byte | The green component. Valid values are 0 through 255. |
blue | byte | The blue component. Valid values are 0 through 255. |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
fromArgb(int alpha, Color baseColor)
public static Color fromArgb(int alpha, Color baseColor)
Creates a com.aspose.imaging.Color
structure from the specified com.aspose.imaging.Color
structure, but with the new specified alpha value. Although this method allows a 32-bit value to be passed for the alpha value, the value is limited to 8 bits.
Parameters:
Parameter | Type | Description |
---|---|---|
alpha | int | The alpha value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
baseColor | Color | The com.aspose.imaging.Color from which to create the new com.aspose.imaging.Color . |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
fromArgb(int red, int green, int blue)
public static Color fromArgb(int red, int green, int blue)
Creates a com.aspose.imaging.Color
structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.
Parameters:
Parameter | Type | Description |
---|---|---|
red | int | The red component value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
green | int | The green component value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
blue | int | The blue component value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
fromArgb(byte red, byte green, byte blue)
public static Color fromArgb(byte red, byte green, byte blue)
Creates a com.aspose.imaging.Color
structure from the specified 8-bit color values (red, green, and blue). The alpha value is implicitly 255 (fully opaque). Although this method allows a 32-bit value to be passed for each color component, the value of each component is limited to 8 bits.
Parameters:
Parameter | Type | Description |
---|---|---|
red | byte | The red component value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
green | byte | The green component value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
blue | byte | The blue component value for the new com.aspose.imaging.Color . Valid values are 0 through 255. |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
fromKnownColor(int color)
public static Color fromKnownColor(int color)
Creates a com.aspose.imaging.Color
structure from the specified predefined color.
Parameters:
Parameter | Type | Description |
---|---|---|
color | int | An element of the Aspose.Imaging.KnownColor enumeration. |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
fromName(String name)
public static Color fromName(String name)
Creates a com.aspose.imaging.Color
structure from the specified name of a predefined color.
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String | A string that is the name of a predefined color. Valid names are the same as the names of the elements of the Aspose.Imaging.KnownColor enumeration. |
Returns:
Color - The com.aspose.imaging.Color
that this method creates.
toCmyk(Color[] pixels)
public static CmykColor[] toCmyk(Color[] pixels)
The conversion from Color to CMYKColor. This method is deprecated. Please use more effective CmykColorHelper.toCmyk(Color[]).
Parameters:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The pixels of Color type in RGB format. |
Returns: com.aspose.imaging.CmykColor[] - The CmykColor[].
toCmyk(Color pixel)
public static CmykColor toCmyk(Color pixel)
The conversion from Color to CMYKColor. This method is deprecated. Please use more effective CmykColorHelper.toCmyk(Color).
Parameters:
Parameter | Type | Description |
---|---|---|
pixel | Color | The pixel of Color type in RGB format. |
Returns: CmykColor - The CmykColor.
toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)
public static CmykColor toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)
The conversion from Color to CMYKColor using icc conversion with default profiles. This method is deprecated. Please use more effective CmykColorHelper.toCmykIcc(Color, InputStream, InputStream).
Parameters:
Parameter | Type | Description |
---|---|---|
pixel | Color | The pixel of Color type in RGB format. |
rgbIccStream | java.io.InputStream | The stream containing icc rgb profile. |
cmykIccStream | java.io.InputStream | The stream containing icc cmyk profile. |
Returns: CmykColor - The CmykColor[].
toCmykIcc(Color pixel)
public static CmykColor toCmykIcc(Color pixel)
The conversion from Color to CMYKColor using icc conversion with default profiles. This method is deprecated. Please use more effective CmykColorHelper.toCmykIcc(Color)
.
Parameters:
Parameter | Type | Description |
---|---|---|
pixel | Color | The pixel of Color type in RGB format. |
Returns: CmykColor - The CmykColor.
toCmykIcc(Color[] pixels)
public static CmykColor[] toCmykIcc(Color[] pixels)
The conversion from Color to CMYKColor using icc conversion with default profiles. This method is deprecated. Please use more effective CmykColorHelper.toCmykIcc(Color[])
.
Parameters:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The pixels of Color type in RGB format. |
Returns: com.aspose.imaging.CmykColor[] - The CmykColor[].
toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)
public static CmykColor[] toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)
The conversion from Color to CMYKColor using icc conversion. This method is deprecated. Please use more effective CmykColorHelper.toCmykIcc(Color[], InputStream, InputStream)
.
Parameters:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The pixels of Color type in RGB format. |
rgbIccStream | java.io.InputStream | The stream containing icc rgb profile. |
cmykIccStream | java.io.InputStream | The stream containing icc cmyk profile. |
Returns: com.aspose.imaging.CmykColor[] - The CmykColor[].
isEquals(Color obj1, Color obj2)
public static boolean isEquals(Color obj1, Color obj2)
Parameters:
Parameter | Type | Description |
---|---|---|
obj1 | Color | |
obj2 | Color |
Returns: boolean
getR()
public byte getR()
Gets the red component value of this com.aspose.imaging.Color
structure.
Returns:
byte - The red component value of this com.aspose.imaging.Color
.
getG()
public byte getG()
Gets the green component value of this com.aspose.imaging.Color
structure.
Returns:
byte - The green component value of this com.aspose.imaging.Color
.
getB()
public byte getB()
Gets the blue component value of this com.aspose.imaging.Color
structure.
Returns:
byte - The blue component value of this com.aspose.imaging.Color
.
getA()
public byte getA()
Gets the alpha component value of this com.aspose.imaging.Color
structure.
Returns:
byte - The alpha component value of this com.aspose.imaging.Color
.
isKnownColor()
public boolean isKnownColor()
Gets a value indicating whether this com.aspose.imaging.Color
structure is a predefined color. Predefined colors are represented by the elements of the Aspose.Imaging.KnownColor
enumeration.
Returns:
boolean - True if this com.aspose.imaging.Color
was created from a predefined color by using either the Aspose.Imaging.Color.FromName(String)
method or the Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor)
method; otherwise, false.
isEmpty()
public boolean isEmpty()
Gets a value indicating whether this com.aspose.imaging.Color
structure is uninitialized.
Returns: boolean - This property returns true if this color is uninitialized; otherwise, false.
isNamedColor()
public boolean isNamedColor()
Gets a value indicating whether this com.aspose.imaging.Color
structure is a named color or a member of the Aspose.Imaging.KnownColor
enumeration.
Returns:
boolean - True if this com.aspose.imaging.Color
was created by using either the Aspose.Imaging.Color.FromName(String)
method or the Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor)
method; otherwise, false.
getName()
public String getName()
Gets the name of this com.aspose.imaging.Color
.
Returns:
java.lang.String - The name of this com.aspose.imaging.Color
.
getBrightness()
public float getBrightness()
Gets the hue-saturation-brightness (HSB) brightness value for this com.aspose.imaging.Color
structure.
Returns:
float - The brightness of this com.aspose.imaging.Color
. The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.
getHue()
public float getHue()
Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this com.aspose.imaging.Color
structure.
Returns:
float - The hue, in degrees, of this com.aspose.imaging.Color
. The hue is measured in degrees, ranging from 0.0 through 360.0, in HSB color space.
getSaturation()
public float getSaturation()
Gets the hue-saturation-brightness (HSB) saturation value for this com.aspose.imaging.Color
structure.
Returns:
float - The saturation of this com.aspose.imaging.Color
. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.
toArgb()
public int toArgb()
Gets the 32-bit ARGB value of this com.aspose.imaging.Color
structure.
Returns:
int - The 32-bit ARGB value of this com.aspose.imaging.Color
.
toKnownColor()
public int toKnownColor()
Gets the Aspose.Imaging.KnownColor
value of this com.aspose.imaging.Color
structure.
Returns:
int - An element of the Aspose.Imaging.KnownColor
enumeration, if the com.aspose.imaging.Color
is created from a predefined color by using either the Aspose.Imaging.Color.FromName(String)
method or the Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor)
method; otherwise, 0.
toString()
public String toString()
Converts this com.aspose.imaging.Color
structure to a human-readable string.
Returns:
java.lang.String - A string that is the name of this com.aspose.imaging.Color
, if the com.aspose.imaging.Color
is created from a predefined color by using either the Aspose.Imaging.Color.FromName(String)
method or the Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor)
method; otherwise, a string that consists of the ARGB component names and their values.
equals(Object obj)
public boolean equals(Object obj)
Tests whether the specified object is a com.aspose.imaging.Color
structure and is equivalent to this com.aspose.imaging.Color
structure.
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | The object to test. |
Returns:
boolean - True if obj
is a com.aspose.imaging.Color
structure equivalent to this com.aspose.imaging.Color
structure; otherwise, false.
hashCode()
public int hashCode()
Returns a hash code for this com.aspose.imaging.Color
structure.
Returns:
int - An integer value that specifies the hash code for this com.aspose.imaging.Color
.
CloneTo(Color that)
public void CloneTo(Color that)
Parameters:
Parameter | Type | Description |
---|---|---|
that | Color |
Clone()
public Color Clone()
Returns: Color