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

像素的颜色。

构造函数

构造函数描述
Color()

方法

方法描述
getEmpty()获取一个空的 Color
getTransparent()获取系统定义的颜色。
getAliceBlue()获取系统定义的颜色。
getAntiqueWhite()获取系统定义的颜色。
getAqua()获取系统定义的颜色。
getAquamarine()获取系统定义的颜色。
getAzure()获取系统定义的颜色。
getBeige()获取系统定义的颜色。
getBisque()获取系统定义的颜色。
getBlack()获取系统定义的颜色。
getBlanchedAlmond()获取系统定义的颜色。
getBlue()获取系统定义的颜色。
getBlueViolet()获取系统定义的颜色。
getBrown()获取系统定义的颜色。
getBurlyWood()获取系统定义的颜色。
getCadetBlue()获取系统定义的颜色。
getChartreuse()获取系统定义的颜色。
getChocolate()获取系统定义的颜色。
getCoral()获取系统定义的颜色。
getCornflowerBlue()获取系统定义的颜色。
getCornsilk()获取系统定义的颜色。
getCrimson()获取系统定义的颜色。
getCyan()获取系统定义的颜色。
getDarkBlue()获取系统定义的颜色。
getDarkCyan()获取系统定义的颜色。
getDarkGoldenrod()获取系统定义的颜色。
getDarkGray()获取系统定义的颜色。
getDarkGreen()获取系统定义的颜色。
getDarkKhaki()获取系统定义的颜色。
getDarkMagenta()获取系统定义的颜色。
getDarkOliveGreen()获取系统定义的颜色。
getDarkOrange()获取系统定义的颜色。
getDarkOrchid()获取系统定义的颜色。
getDarkRed()获取系统定义的颜色。
getDarkSalmon()获取系统定义的颜色。
getDarkSeaGreen()获取系统定义的颜色。
getDarkSlateBlue()获取系统定义的颜色。
getDarkSlateGray()获取系统定义的颜色。
getDarkTurquoise()获取系统定义的颜色。
getDarkViolet()获取系统定义的颜色。
getDeepPink()获取系统定义的颜色。
getDeepSkyBlue()获取系统定义的颜色。
getDimGray()获取系统定义的颜色。
getDodgerBlue()获取系统定义的颜色。
getFirebrick()获取系统定义的颜色。
getFloralWhite()获取系统定义的颜色。
getForestGreen()获取系统定义的颜色。
getFuchsia()获取系统定义的颜色。
getGainsboro()获取系统定义的颜色。
getGhostWhite()获取系统定义的颜色。
getGold()获取系统定义的颜色。
getGoldenrod()获取系统定义的颜色。
getGray()获取系统定义的颜色。
getGreen()获取系统定义的颜色。
getGreenYellow()获取系统定义的颜色。
getHoneydew()获取系统定义的颜色。
getHotPink()获取系统定义的颜色。
getIndianRed()获取系统定义的颜色。
getIndigo()获取系统定义的颜色。
getIvory()获取系统定义的颜色。
getKhaki()获取系统定义的颜色。
getLavender()获取系统定义的颜色。
getLavenderBlush()获取系统定义的颜色。
getLawnGreen()获取系统定义的颜色。
getLemonChiffon()获取系统定义的颜色。
getLightBlue()获取系统定义的颜色。
getLightCoral()获取系统定义的颜色。
getLightCyan()获取系统定义的颜色。
getLightGoldenrodYellow()获取系统定义的颜色。
getLightGreen()获取系统定义的颜色。
getLightGray()获取系统定义的颜色。
getLightPink()获取系统定义的颜色。
getLightSalmon()获取系统定义的颜色。
getLightSeaGreen()获取系统定义的颜色。
getLightSkyBlue()获取系统定义的颜色。
getLightSlateGray()获取系统定义的颜色。
getLightSteelBlue()获取系统定义的颜色。
getLightYellow()获取系统定义的颜色。
getLime()获取系统定义的颜色。
getLimeGreen()获取系统定义的颜色。
getLinen()获取系统定义的颜色。
getMagenta()获取系统定义的颜色。
getMaroon()获取系统定义的颜色。
getMediumAquamarine()获取系统定义的颜色。
getMediumBlue()获取系统定义的颜色。
getMediumOrchid()获取系统定义的颜色。
getMediumPurple()获取系统定义的颜色。
getMediumSeaGreen()获取系统定义的颜色。
getMediumSlateBlue()获取系统定义的颜色。
getMediumSpringGreen()获取系统定义的颜色。
getMediumTurquoise()获取系统定义的颜色。
getMediumVioletRed()获取系统定义的颜色。
getMidnightBlue()获取系统定义的颜色。
getMintCream()获取系统定义的颜色。
getMistyRose()获取系统定义的颜色。
getMoccasin()获取系统定义的颜色。
getNavajoWhite()获取系统定义的颜色。
getNavy()获取系统定义的颜色。
getOldLace()获取系统定义的颜色。
getOlive()获取系统定义的颜色。
getOliveDrab()获取系统定义的颜色。
getOrange()获取系统定义的颜色。
getOrangeRed()获取系统定义的颜色。
getOrchid()获取系统定义的颜色。
getPaleGoldenrod()获取系统定义的颜色。
getPaleGreen()获取系统定义的颜色。
getPaleTurquoise()获取系统定义的颜色。
getPaleVioletRed()获取系统定义的颜色。
getPapayaWhip()获取系统定义的颜色。
getPeachPuff()获取系统定义的颜色。
getPeru()获取系统定义的颜色。
getPink()获取系统定义的颜色。
getPlum()获取系统定义的颜色。
getPowderBlue()获取系统定义的颜色。
getPurple()获取系统定义的颜色。
getRed()获取系统定义的颜色。
getRosyBrown()获取系统定义的颜色。
getRoyalBlue()获取系统定义的颜色。
getSaddleBrown()获取系统定义的颜色。
getSalmon()获取系统定义的颜色。
getSandyBrown()获取系统定义的颜色。
getSeaGreen()获取系统定义的颜色。
getSeaShell()获取系统定义的颜色。
getSienna()获取系统定义的颜色。
getSilver()获取系统定义的颜色。
getSkyBlue()获取系统定义的颜色。
getSlateBlue()获取系统定义的颜色。
getSlateGray()获取系统定义的颜色。
getSnow()获取系统定义的颜色。
getSpringGreen()获取系统定义的颜色。
getSteelBlue()获取系统定义的颜色。
getTan()获取系统定义的颜色。
getTeal()获取系统定义的颜色。
getThistle()获取系统定义的颜色。
getTomato()获取系统定义的颜色。
getTurquoise()获取系统定义的颜色。
getViolet()获取系统定义的颜色。
getWheat()获取系统定义的颜色。
getWhite()获取系统定义的颜色。
getWhiteSmoke()获取系统定义的颜色。
getYellow()获取系统定义的颜色。
getYellowGreen()获取系统定义的颜色。
op_Equality(Color left, Color right)测试两个指定的 com.aspose.imaging.Color 结构是否等价。
op_Inequality(Color left, Color right)测试两个指定的 com.aspose.imaging.Color 结构是否不同。
fromArgb(int argb)从 32 位 ARGB 值创建 com.aspose.imaging.Color 结构。
fromArgb(int alpha, int red, int green, int blue)从四个 ARGB 分量(alpha、red、green 和 blue)值创建 com.aspose.imaging.Color 结构。
fromArgb(byte alpha, byte red, byte green, byte blue)从四个 ARGB 分量(alpha、red、green 和 blue)值创建 com.aspose.imaging.Color 结构。
fromArgb(int alpha, Color baseColor)从指定的 com.aspose.imaging.Color 结构创建一个 com.aspose.imaging.Color 结构,但使用新的指定 alpha 值。
fromArgb(int red, int green, int blue)从指定的 8 位颜色值(红色、绿色和蓝色)创建一个 com.aspose.imaging.Color 结构。
fromArgb(byte red, byte green, byte blue)从指定的 8 位颜色值(红色、绿色和蓝色)创建一个 com.aspose.imaging.Color 结构。
fromKnownColor(int color)从指定的预定义颜色创建一个 com.aspose.imaging.Color 结构。
fromName(String name)根据指定的预定义颜色名称创建一个 com.aspose.imaging.Color 结构。
toCmyk(Color[] pixels)从 Color 转换为 CMYKColor 的过程。
toCmyk(Color pixel)从 Color 转换为 CMYKColor 的过程。
toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)使用默认配置文件的 ICC 转换将 Color 转换为 CMYKColor 的过程。
toCmykIcc(Color pixel)使用默认配置文件的 ICC 转换将 Color 转换为 CMYKColor 的过程。
toCmykIcc(Color[] pixels)使用默认配置文件的 ICC 转换将 Color 转换为 CMYKColor 的过程。
toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)使用 ICC 转换将 Color 转换为 CMYKColor 的过程。
isEquals(Color obj1, Color obj2)
getR()获取此 com.aspose.imaging.Color 结构的红色分量值。
getG()获取此 com.aspose.imaging.Color 结构的绿色分量值。
getB()获取此 com.aspose.imaging.Color 结构的蓝色分量值。
getA()获取此 com.aspose.imaging.Color 结构的 alpha 分量值。
isKnownColor()获取一个值,指示此 com.aspose.imaging.Color 结构是否为预定义颜色。
isEmpty()获取一个值,指示此 com.aspose.imaging.Color 结构是否未初始化。
isNamedColor()获取一个值,指示此 com.aspose.imaging.Color 结构是命名颜色还是 Aspose.Imaging.KnownColor 枚举的成员。
getName()获取此 com.aspose.imaging.Color 的名称。
getBrightness()获取此 com.aspose.imaging.Color 结构的色相-饱和度-亮度 (HSB) 亮度值。
getHue()获取此 com.aspose.imaging.Color 结构的色相-饱和度-亮度 (HSB) 色相值(以度为单位)。
getSaturation()获取此 com.aspose.imaging.Color 结构的色相-饱和度-亮度 (HSB) 饱和度值。
toArgb()获取此 com.aspose.imaging.Color 结构的 32 位 ARGB 值。
toKnownColor()获取此 com.aspose.imaging.Color 结构的 Aspose.Imaging.KnownColor 值。
toString()将此 com.aspose.imaging.Color 结构转换为可读的字符串。
equals(Object obj)测试指定的对象是否为 com.aspose.imaging.Color 结构且等价于此 com.aspose.imaging.Color 结构。
hashCode()返回此 com.aspose.imaging.Color 结构的哈希码。
CloneTo(Color that)
Clone()

Color()

public Color()

getEmpty()

public static Color getEmpty()

获取一个空的 Color

Returns: Color - The empty Color.

getTransparent()

public static Color getTransparent()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getAliceBlue()

public static Color getAliceBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getAntiqueWhite()

public static Color getAntiqueWhite()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getAqua()

public static Color getAqua()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getAquamarine()

public static Color getAquamarine()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getAzure()

public static Color getAzure()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBeige()

public static Color getBeige()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBisque()

public static Color getBisque()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBlack()

public static Color getBlack()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBlanchedAlmond()

public static Color getBlanchedAlmond()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBlue()

public static Color getBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBlueViolet()

public static Color getBlueViolet()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBrown()

public static Color getBrown()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getBurlyWood()

public static Color getBurlyWood()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getCadetBlue()

public static Color getCadetBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getChartreuse()

public static Color getChartreuse()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getChocolate()

public static Color getChocolate()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getCoral()

public static Color getCoral()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getCornflowerBlue()

public static Color getCornflowerBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getCornsilk()

public static Color getCornsilk()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getCrimson()

public static Color getCrimson()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getCyan()

public static Color getCyan()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkBlue()

public static Color getDarkBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkCyan()

public static Color getDarkCyan()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkGoldenrod()

public static Color getDarkGoldenrod()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkGray()

public static Color getDarkGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkGreen()

public static Color getDarkGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkKhaki()

public static Color getDarkKhaki()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkMagenta()

public static Color getDarkMagenta()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkOliveGreen()

public static Color getDarkOliveGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkOrange()

public static Color getDarkOrange()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkOrchid()

public static Color getDarkOrchid()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkRed()

public static Color getDarkRed()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkSalmon()

public static Color getDarkSalmon()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkSeaGreen()

public static Color getDarkSeaGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkSlateBlue()

public static Color getDarkSlateBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkSlateGray()

public static Color getDarkSlateGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkTurquoise()

public static Color getDarkTurquoise()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDarkViolet()

public static Color getDarkViolet()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDeepPink()

public static Color getDeepPink()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDeepSkyBlue()

public static Color getDeepSkyBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDimGray()

public static Color getDimGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getDodgerBlue()

public static Color getDodgerBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getFirebrick()

public static Color getFirebrick()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getFloralWhite()

public static Color getFloralWhite()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getForestGreen()

public static Color getForestGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getFuchsia()

public static Color getFuchsia()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getGainsboro()

public static Color getGainsboro()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getGhostWhite()

public static Color getGhostWhite()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getGold()

public static Color getGold()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getGoldenrod()

public static Color getGoldenrod()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getGray()

public static Color getGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color structure representing a system-defined color.

getGreen()

public static Color getGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getGreenYellow()

public static Color getGreenYellow()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getHoneydew()

public static Color getHoneydew()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getHotPink()

public static Color getHotPink()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getIndianRed()

public static Color getIndianRed()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getIndigo()

public static Color getIndigo()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getIvory()

public static Color getIvory()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getKhaki()

public static Color getKhaki()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLavender()

public static Color getLavender()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLavenderBlush()

public static Color getLavenderBlush()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLawnGreen()

public static Color getLawnGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLemonChiffon()

public static Color getLemonChiffon()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightBlue()

public static Color getLightBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightCoral()

public static Color getLightCoral()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightCyan()

public static Color getLightCyan()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightGoldenrodYellow()

public static Color getLightGoldenrodYellow()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightGreen()

public static Color getLightGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightGray()

public static Color getLightGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightPink()

public static Color getLightPink()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightSalmon()

public static Color getLightSalmon()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightSeaGreen()

public static Color getLightSeaGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightSkyBlue()

public static Color getLightSkyBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightSlateGray()

public static Color getLightSlateGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightSteelBlue()

public static Color getLightSteelBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLightYellow()

public static Color getLightYellow()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLime()

public static Color getLime()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLimeGreen()

public static Color getLimeGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getLinen()

public static Color getLinen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMagenta()

public static Color getMagenta()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMaroon()

public static Color getMaroon()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumAquamarine()

public static Color getMediumAquamarine()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumBlue()

public static Color getMediumBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumOrchid()

public static Color getMediumOrchid()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumPurple()

public static Color getMediumPurple()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumSeaGreen()

public static Color getMediumSeaGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumSlateBlue()

public static Color getMediumSlateBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumSpringGreen()

public static Color getMediumSpringGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumTurquoise()

public static Color getMediumTurquoise()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMediumVioletRed()

public static Color getMediumVioletRed()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMidnightBlue()

public static Color getMidnightBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMintCream()

public static Color getMintCream()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMistyRose()

public static Color getMistyRose()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getMoccasin()

public static Color getMoccasin()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getNavajoWhite()

public static Color getNavajoWhite()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getNavy()

public static Color getNavy()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getOldLace()

public static Color getOldLace()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getOlive()

public static Color getOlive()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getOliveDrab()

public static Color getOliveDrab()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getOrange()

public static Color getOrange()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getOrangeRed()

public static Color getOrangeRed()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getOrchid()

public static Color getOrchid()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPaleGoldenrod()

public static Color getPaleGoldenrod()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPaleGreen()

public static Color getPaleGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPaleTurquoise()

public static Color getPaleTurquoise()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPaleVioletRed()

public static Color getPaleVioletRed()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPapayaWhip()

public static Color getPapayaWhip()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPeachPuff()

public static Color getPeachPuff()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPeru()

public static Color getPeru()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPink()

public static Color getPink()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPlum()

public static Color getPlum()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPowderBlue()

public static Color getPowderBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getPurple()

public static Color getPurple()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getRed()

public static Color getRed()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getRosyBrown()

public static Color getRosyBrown()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getRoyalBlue()

public static Color getRoyalBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSaddleBrown()

public static Color getSaddleBrown()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSalmon()

public static Color getSalmon()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSandyBrown()

public static Color getSandyBrown()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSeaGreen()

public static Color getSeaGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSeaShell()

public static Color getSeaShell()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSienna()

public static Color getSienna()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSilver()

public static Color getSilver()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSkyBlue()

public static Color getSkyBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSlateBlue()

public static Color getSlateBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSlateGray()

public static Color getSlateGray()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSnow()

public static Color getSnow()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSpringGreen()

public static Color getSpringGreen()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getSteelBlue()

public static Color getSteelBlue()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getTan()

public static Color getTan()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getTeal()

public static Color getTeal()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getThistle()

public static Color getThistle()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getTomato()

public static Color getTomato()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getTurquoise()

public static Color getTurquoise()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getViolet()

public static Color getViolet()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getWheat()

public static Color getWheat()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getWhite()

public static Color getWhite()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getWhiteSmoke()

public static Color getWhiteSmoke()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getYellow()

public static Color getYellow()

获取系统定义的颜色。

Returns: Color - A com.aspose.imaging.Color representing a system-defined color.

getYellowGreen()

public static Color getYellowGreen()

获取系统定义的颜色。

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)

测试两个指定的 com.aspose.imaging.Color 结构是否等价。

Parameters:

参数类型描述
leftColor等号运算符左侧的 com.aspose.imaging.Color
rightColor等号运算符右侧的 com.aspose.imaging.Color

Returns: boolean - 如果两个 com.aspose.imaging.Color 结构相等,则为 True;否则为 false。

op_Inequality(Color left, Color right)

public static boolean op_Inequality(Color left, Color right)

测试两个指定的 com.aspose.imaging.Color 结构是否不同。

Parameters:

参数类型描述
leftColor不等式运算符左侧的 com.aspose.imaging.Color
rightColor不等式运算符右侧的 com.aspose.imaging.Color

Returns: boolean - 如果两个 com.aspose.imaging.Color 结构不同,则为 True;否则为 false。

fromArgb(int argb)

public static Color fromArgb(int argb)

从 32 位 ARGB 值创建 com.aspose.imaging.Color 结构。

Parameters:

参数类型描述
argbint指定 32 位 ARGB 值的参数。

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)

从四个 ARGB 分量(alpha、red、green 和 blue)值创建 com.aspose.imaging.Color 结构。虽然此方法允许为每个分量传入 32 位值,但每个分量的值限制为 8 位。

Parameters:

参数类型描述
alphaintalpha 分量。有效值范围为 0 到 255。
redintred 分量。有效值范围为 0 到 255。
greenintgreen 分量。有效值范围为 0 到 255。
blueintblue 分量。有效值范围为 0 到 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;

    // 保存整幅图像的像素。
    rasterImage.savePixels(rasterImage.getBounds(), colors);

    // 像素以非预乘形式存储在原始图像中。
    // 需要显式指定相应的选项以获取预乘颜色分量。
    // 预乘颜色分量通过以下公式计算:
    // 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)

从四个 ARGB 分量(alpha、red、green 和 blue)值创建 com.aspose.imaging.Color 结构。虽然此方法允许为每个分量传入 32 位值,但每个分量的值限制为 8 位。

Parameters:

参数类型描述
alphabytealpha 分量。有效值范围为 0 到 255。
redbytered 分量。有效值范围为 0 到 255。
greenbytegreen 分量。有效值范围为 0 到 255。
bluebyteblue 分量。有效值范围为 0 到 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)

从指定的 com.aspose.imaging.Color 结构创建 com.aspose.imaging.Color 结构,但使用新的指定 alpha 值。虽然此方法允许为 alpha 值传入 32 位值,但该值限制为 8 位。

Parameters:

参数类型描述
alphaintcom.aspose.imaging.Color 的 alpha 值。有效值范围为 0 到 255。
baseColorColor用于创建新 com.aspose.imaging.Colorcom.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)

从指定的 8 位颜色值(red、green 和 blue)创建 com.aspose.imaging.Color 结构。alpha 值隐式为 255(完全不透明)。虽然此方法允许为每个颜色分量传入 32 位值,但每个分量的值限制为 8 位。

Parameters:

参数类型描述
redintcom.aspose.imaging.Color 的红色分量值。有效值范围为 0 到 255。
greenintcom.aspose.imaging.Color 的绿色分量值。有效值范围为 0 到 255。
blueintcom.aspose.imaging.Color 的蓝色分量值。有效值范围为 0 到 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)

从指定的 8 位颜色值(red、green 和 blue)创建 com.aspose.imaging.Color 结构。alpha 值隐式为 255(完全不透明)。虽然此方法允许为每个颜色分量传入 32 位值,但每个分量的值限制为 8 位。

Parameters:

参数类型描述
redbytecom.aspose.imaging.Color 的红色分量值。有效值范围为 0 到 255。
greenbytecom.aspose.imaging.Color 的绿色分量值。有效值范围为 0 到 255。
bluebytecom.aspose.imaging.Color 的蓝色分量值。有效值范围为 0 到 255。

Returns: Color - The com.aspose.imaging.Color that this method creates.

fromKnownColor(int color)

public static Color fromKnownColor(int color)

从指定的预定义颜色创建一个 com.aspose.imaging.Color 结构。

Parameters:

参数类型描述
颜色intAspose.Imaging.KnownColor 枚举的一个元素。

Returns: Color - The com.aspose.imaging.Color that this method creates.

fromName(String name)

public static Color fromName(String name)

根据指定的预定义颜色名称创建一个 com.aspose.imaging.Color 结构。

Parameters:

参数类型描述
名称java.lang.String一个表示预定义颜色名称的字符串。有效名称与 Aspose.Imaging.KnownColor 枚举元素的名称相同。

Returns: Color - The com.aspose.imaging.Color that this method creates.

toCmyk(Color[] pixels)

public static CmykColor[] toCmyk(Color[] pixels)

Color 转换为 CMYKColor。此方法已弃用。请使用更有效的 CmykColorHelper.toCmyk(Color[])

Parameters:

参数类型描述
pixelsColor[]RGB 格式的 Color 类型像素。

Returns: com.aspose.imaging.CmykColor[] - CmykColor 的数组。

toCmyk(Color pixel)

public static CmykColor toCmyk(Color pixel)

Color 转换为 CMYKColor。此方法已弃用。请使用更有效的 CmykColorHelper.toCmyk(Color)

Parameters:

参数类型描述
pixelColorRGB 格式的 Color 类型像素。

Returns: CmykColor - The CmykColor.

toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)

public static CmykColor toCmykIcc(Color pixel, InputStream rgbIccStream, InputStream cmykIccStream)

使用默认配置文件的 ICC 转换将 Color 转换为 CMYKColor。此方法已弃用。请使用更有效的 CmykColorHelper.toCmykIcc(Color, InputStream, InputStream)

Parameters:

参数类型描述
pixelColorRGB 格式的 Color 类型像素。
rgbIccStreamjava.io.InputStream包含 ICC RGB 配置文件的流。
cmykIccStreamjava.io.InputStream包含 ICC CMYK 配置文件的流。

Returns: CmykColor - The CmykColor[].

toCmykIcc(Color pixel)

public static CmykColor toCmykIcc(Color pixel)

使用默认配置文件的 ICC 转换将 Color 转换为 CMYKColor。此方法已弃用。请使用更有效的 CmykColorHelper.toCmykIcc(Color)

Parameters:

参数类型描述
pixelColorRGB 格式的 Color 类型像素。

Returns: CmykColor - The CmykColor.

toCmykIcc(Color[] pixels)

public static CmykColor[] toCmykIcc(Color[] pixels)

使用默认配置文件的 ICC 转换将 Color 转换为 CMYKColor。此方法已弃用。请使用更有效的 CmykColorHelper.toCmykIcc(Color[])

Parameters:

参数类型描述
pixelsColor[]RGB 格式的 Color 类型像素。

Returns: com.aspose.imaging.CmykColor[] - CmykColor 的数组。

toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

public static CmykColor[] toCmykIcc(Color[] pixels, InputStream rgbIccStream, InputStream cmykIccStream)

使用 ICC 转换将 Color 转换为 CMYKColor。此方法已弃用。请使用更有效的 CmykColorHelper.toCmykIcc(Color[], InputStream, InputStream)

Parameters:

参数类型描述
pixelsColor[]RGB 格式的 Color 类型像素。
rgbIccStreamjava.io.InputStream包含 ICC RGB 配置文件的流。
cmykIccStreamjava.io.InputStream包含 ICC CMYK 配置文件的流。

Returns: com.aspose.imaging.CmykColor[] - CmykColor 的数组。

isEquals(Color obj1, Color obj2)

public static boolean isEquals(Color obj1, Color obj2)

Parameters:

参数类型描述
obj1Color
obj2Color

Returns: boolean

getR()

public byte getR()

获取此 com.aspose.imaging.Color 结构的红色分量值。

Returns: byte - 此 com.aspose.imaging.Color 的红色分量值。

getG()

public byte getG()

获取此 com.aspose.imaging.Color 结构的绿色分量值。

Returns: byte - 此 com.aspose.imaging.Color 的绿色分量值。

getB()

public byte getB()

获取此 com.aspose.imaging.Color 结构的蓝色分量值。

Returns: byte - 此 com.aspose.imaging.Color 的蓝色分量值。

getA()

public byte getA()

获取此 com.aspose.imaging.Color 结构的 alpha 分量值。

Returns: byte - 此 com.aspose.imaging.Color 的 alpha 分量值。

isKnownColor()

public boolean isKnownColor()

获取一个值,指示此 com.aspose.imaging.Color 结构是否为预定义颜色。预定义颜色由 Aspose.Imaging.KnownColor 枚举的元素表示。

Returns: boolean - 如果此 com.aspose.imaging.Color 是通过使用 Aspose.Imaging.Color.FromName(String) 方法或 Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor) 方法从预定义颜色创建的,则为 true;否则为 false。

isEmpty()

public boolean isEmpty()

获取一个值,指示此 com.aspose.imaging.Color 结构是否未初始化。

Returns: boolean - 如果此颜色未初始化,则此属性返回 true;否则返回 false。

isNamedColor()

public boolean isNamedColor()

获取一个值,指示此 com.aspose.imaging.Color 结构是命名颜色还是 Aspose.Imaging.KnownColor 枚举的成员。

Returns: boolean - 如果此 com.aspose.imaging.Color 是通过使用 Aspose.Imaging.Color.FromName(String) 方法或 Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor) 方法创建的,则为 true;否则为 false。

getName()

public String getName()

获取此 com.aspose.imaging.Color 的名称。

Returns: java.lang.String - 此 com.aspose.imaging.Color 的名称。

getBrightness()

public float getBrightness()

获取此 com.aspose.imaging.Color 结构的色相-饱和度-亮度 (HSB) 亮度值。

Returns: float - 此 com.aspose.imaging.Color 的亮度。亮度范围从 0.0 到 1.0,其中 0.0 表示黑色,1.0 表示白色。

getHue()

public float getHue()

获取此 com.aspose.imaging.Color 结构的色相-饱和度-亮度 (HSB) 色相值(以度为单位)。

Returns: float - 此 com.aspose.imaging.Color 的色相(以度为单位)。色相以度数测量,范围从 0.0 到 360.0,使用 HSB 颜色空间。

getSaturation()

public float getSaturation()

获取此 com.aspose.imaging.Color 结构的色相-饱和度-亮度 (HSB) 饱和度值。

Returns: float - 此 com.aspose.imaging.Color 的饱和度。饱和度范围从 0.0 到 1.0,其中 0.0 为灰度,1.0 为最高饱和度。

toArgb()

public int toArgb()

获取此 com.aspose.imaging.Color 结构的 32 位 ARGB 值。

Returns: int - 此 com.aspose.imaging.Color 的 32 位 ARGB 值。

toKnownColor()

public int toKnownColor()

获取此 com.aspose.imaging.Color 结构的 Aspose.Imaging.KnownColor 值。

Returns: int - Aspose.Imaging.KnownColor 枚举的一个元素,如果 com.aspose.imaging.Color 是通过使用 Aspose.Imaging.Color.FromName(String) 方法或 Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor) 方法从预定义颜色创建的;否则为 0。

toString()

public String toString()

将此 com.aspose.imaging.Color 结构转换为可读的字符串。

Returns: java.lang.String - 一个字符串,表示此 com.aspose.imaging.Color 的名称,如果 com.aspose.imaging.Color 是通过使用 Aspose.Imaging.Color.FromName(String) 方法或 Aspose.Imaging.Color.FromKnownColor(Aspose.Imaging.KnownColor) 方法从预定义颜色创建的;否则为由 ARGB 组件名称及其数值组成的字符串。

equals(Object obj)

public boolean equals(Object obj)

测试指定的对象是否为 com.aspose.imaging.Color 结构且等价于此 com.aspose.imaging.Color 结构。

Parameters:

参数类型描述
objjava.lang.Object要测试的对象。

Returns: boolean - 如果 obj 是等价于此 com.aspose.imaging.Color 结构的 com.aspose.imaging.Color 结构,则为 true;否则为 false。

hashCode()

public int hashCode()

返回此 com.aspose.imaging.Color 结构的哈希码。

Returns: int - 指定此 com.aspose.imaging.Color 的哈希码的整数值。

CloneTo(Color that)

public void CloneTo(Color that)

Parameters:

参数类型描述
thatColor

Clone()

public Color Clone()

Returns: Color