Color Class

Summary: The color of the pixel.

Module: aspose.imaging

Full Name: aspose.imaging.Color

Constructors

NameDescription
Color()Initializes a new instance of the Color class

Properties

NameTypeAccessDescription
abyterGets the alpha component value of this Color structure.
alice_blue [static]ColorrGets a system-defined color.
antique_white [static]ColorrGets a system-defined color.
aqua [static]ColorrGets a system-defined color.
aquamarine [static]ColorrGets a system-defined color.
azure [static]ColorrGets a system-defined color.
bbyterGets the blue component value of this Color structure.
beige [static]ColorrGets a system-defined color.
bisque [static]ColorrGets a system-defined color.
black [static]ColorrGets a system-defined color.
blanched_almond [static]ColorrGets a system-defined color.
blue [static]ColorrGets a system-defined color.
blue_violet [static]ColorrGets a system-defined color.
brown [static]ColorrGets a system-defined color.
burly_wood [static]ColorrGets a system-defined color.
cadet_blue [static]ColorrGets a system-defined color.
chartreuse [static]ColorrGets a system-defined color.
chocolate [static]ColorrGets a system-defined color.
coral [static]ColorrGets a system-defined color.
cornflower_blue [static]ColorrGets a system-defined color.
cornsilk [static]ColorrGets a system-defined color.
crimson [static]ColorrGets a system-defined color.
cyan [static]ColorrGets a system-defined color.
dark_blue [static]ColorrGets a system-defined color.
dark_cyan [static]ColorrGets a system-defined color.
dark_goldenrod [static]ColorrGets a system-defined color.
dark_gray [static]ColorrGets a system-defined color.
dark_green [static]ColorrGets a system-defined color.
dark_khaki [static]ColorrGets a system-defined color.
dark_magenta [static]ColorrGets a system-defined color.
dark_olive_green [static]ColorrGets a system-defined color.
dark_orange [static]ColorrGets a system-defined color.
dark_orchid [static]ColorrGets a system-defined color.
dark_red [static]ColorrGets a system-defined color.
dark_salmon [static]ColorrGets a system-defined color.
dark_sea_green [static]ColorrGets a system-defined color.
dark_slate_blue [static]ColorrGets a system-defined color.
dark_slate_gray [static]ColorrGets a system-defined color.
dark_turquoise [static]ColorrGets a system-defined color.
dark_violet [static]ColorrGets a system-defined color.
deep_pink [static]ColorrGets a system-defined color.
deep_sky_blue [static]ColorrGets a system-defined color.
dim_gray [static]ColorrGets a system-defined color.
dodger_blue [static]ColorrGets a system-defined color.
empty [static]ColorrGets an empty Color.
firebrick [static]ColorrGets a system-defined color.
floral_white [static]ColorrGets a system-defined color.
forest_green [static]ColorrGets a system-defined color.
fuchsia [static]ColorrGets a system-defined color.
gbyterGets the green component value of this Color structure.
gainsboro [static]ColorrGets a system-defined color.
ghost_white [static]ColorrGets a system-defined color.
gold [static]ColorrGets a system-defined color.
goldenrod [static]ColorrGets a system-defined color.
gray [static]ColorrGets a system-defined color.
green [static]ColorrGets a system-defined color.
green_yellow [static]ColorrGets a system-defined color.
honeydew [static]ColorrGets a system-defined color.
hot_pink [static]ColorrGets a system-defined color.
indian_red [static]ColorrGets a system-defined color.
indigo [static]ColorrGets a system-defined color.
is_emptyboolrGets a value indicating whether this Color structure is uninitialized.
is_known_colorboolrGets a value indicating whether this Color structure is a predefined color. Predefined colors are represented by the elements of the KnownColor enumeration.
is_named_colorboolrGets a value indicating whether this Color structure is a named color or a member of the KnownColor enumeration.
ivory [static]ColorrGets a system-defined color.
khaki [static]ColorrGets a system-defined color.
lavender [static]ColorrGets a system-defined color.
lavender_blush [static]ColorrGets a system-defined color.
lawn_green [static]ColorrGets a system-defined color.
lemon_chiffon [static]ColorrGets a system-defined color.
light_blue [static]ColorrGets a system-defined color.
light_coral [static]ColorrGets a system-defined color.
light_cyan [static]ColorrGets a system-defined color.
light_goldenrod_yellow [static]ColorrGets a system-defined color.
light_gray [static]ColorrGets a system-defined color.
light_green [static]ColorrGets a system-defined color.
light_pink [static]ColorrGets a system-defined color.
light_salmon [static]ColorrGets a system-defined color.
light_sea_green [static]ColorrGets a system-defined color.
light_sky_blue [static]ColorrGets a system-defined color.
light_slate_gray [static]ColorrGets a system-defined color.
light_steel_blue [static]ColorrGets a system-defined color.
light_yellow [static]ColorrGets a system-defined color.
lime [static]ColorrGets a system-defined color.
lime_green [static]ColorrGets a system-defined color.
linen [static]ColorrGets a system-defined color.
magenta [static]ColorrGets a system-defined color.
maroon [static]ColorrGets a system-defined color.
medium_aquamarine [static]ColorrGets a system-defined color.
medium_blue [static]ColorrGets a system-defined color.
medium_orchid [static]ColorrGets a system-defined color.
medium_purple [static]ColorrGets a system-defined color.
medium_sea_green [static]ColorrGets a system-defined color.
medium_slate_blue [static]ColorrGets a system-defined color.
medium_spring_green [static]ColorrGets a system-defined color.
medium_turquoise [static]ColorrGets a system-defined color.
medium_violet_red [static]ColorrGets a system-defined color.
midnight_blue [static]ColorrGets a system-defined color.
mint_cream [static]ColorrGets a system-defined color.
misty_rose [static]ColorrGets a system-defined color.
moccasin [static]ColorrGets a system-defined color.
namestringrGets the name of this Color.
navajo_white [static]ColorrGets a system-defined color.
navy [static]ColorrGets a system-defined color.
old_lace [static]ColorrGets a system-defined color.
olive [static]ColorrGets a system-defined color.
olive_drab [static]ColorrGets a system-defined color.
orange [static]ColorrGets a system-defined color.
orange_red [static]ColorrGets a system-defined color.
orchid [static]ColorrGets a system-defined color.
pale_goldenrod [static]ColorrGets a system-defined color.
pale_green [static]ColorrGets a system-defined color.
pale_turquoise [static]ColorrGets a system-defined color.
pale_violet_red [static]ColorrGets a system-defined color.
papaya_whip [static]ColorrGets a system-defined color.
peach_puff [static]ColorrGets a system-defined color.
peru [static]ColorrGets a system-defined color.
pink [static]ColorrGets a system-defined color.
plum [static]ColorrGets a system-defined color.
powder_blue [static]ColorrGets a system-defined color.
purple [static]ColorrGets a system-defined color.
rbyterGets the red component value of this Color structure.
red [static]ColorrGets a system-defined color.
rosy_brown [static]ColorrGets a system-defined color.
royal_blue [static]ColorrGets a system-defined color.
saddle_brown [static]ColorrGets a system-defined color.
salmon [static]ColorrGets a system-defined color.
sandy_brown [static]ColorrGets a system-defined color.
sea_green [static]ColorrGets a system-defined color.
sea_shell [static]ColorrGets a system-defined color.
sienna [static]ColorrGets a system-defined color.
silver [static]ColorrGets a system-defined color.
sky_blue [static]ColorrGets a system-defined color.
slate_blue [static]ColorrGets a system-defined color.
slate_gray [static]ColorrGets a system-defined color.
snow [static]ColorrGets a system-defined color.
spring_green [static]ColorrGets a system-defined color.
steel_blue [static]ColorrGets a system-defined color.
tan [static]ColorrGets a system-defined color.
teal [static]ColorrGets a system-defined color.
thistle [static]ColorrGets a system-defined color.
tomato [static]ColorrGets a system-defined color.
transparent [static]ColorrGets a system-defined color.
turquoise [static]ColorrGets a system-defined color.
violet [static]ColorrGets a system-defined color.
wheat [static]ColorrGets a system-defined color.
white [static]ColorrGets a system-defined color.
white_smoke [static]ColorrGets a system-defined color.
yellow [static]ColorrGets a system-defined color.
yellow_green [static]ColorrGets a system-defined color.

Methods

NameDescription
from_argb(alpha, base_color)Creates a Color structure from the specified 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.
from_argb(alpha, red, green, blue)Creates a 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.
from_argb(argb)Creates a Color structure from a 32-bit ARGB value.
from_argb(red, green, blue)Creates a 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.
from_known_color(color)Creates a Color structure from the specified predefined color.
from_name(name)Creates a Color structure from the specified name of a predefined color.
get_brightness()Gets the hue-saturation-brightness (HSB) brightness value for this Color structure.
get_hue()Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this Color structure.
get_saturation()Gets the hue-saturation-brightness (HSB) saturation value for this Color structure.
to_argb()Gets the 32-bit ARGB value of this Color structure.
to_cmyk(pixel)The conversion from Color to CMYKColor.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk(pixels).
to_cmyk(pixels)The conversion from Color to CMYKColor.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk(pixels).
to_cmyk_color(pixel)The conversion from Color to CMYKColor.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk(pixel).
to_cmyk_color_with_def_icc(pixel)The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixel).
to_cmyk_color_with_icc(pixel, rgb_icc_stream, cmyk_icc_stream)The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color,_io.BufferedRandom,_io.BufferedRandom).
to_cmyk_colors(pixels)The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixels).
to_cmyk_colors_with_def_icc(pixels)The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixels).
to_cmyk_colors_with_icc(pixels, rgb_icc_stream, cmyk_icc_stream)The conversion from Color to CMYKColor using icc conversion.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color[],_io.BufferedRandom,_io.BufferedRandom).
to_cmyk_icc(pixel)The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixel).
to_cmyk_icc(pixel, rgb_icc_stream, cmyk_icc_stream)The conversion from Color to CMYKColor using icc conversion.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color[],_io.BufferedRandom,_io.BufferedRandom).
to_cmyk_icc(pixels)The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixels).
to_cmyk_icc(pixels, rgb_icc_stream, cmyk_icc_stream)The conversion from Color to CMYKColor using icc conversion.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color[],_io.BufferedRandom,_io.BufferedRandom).
to_known_color()Gets the KnownColor value of this Color structure.

Constructor: Color()

 Color() 

Initializes a new instance of the Color class

Method: from_argb(alpha, base_color) [static]

 from_argb(alpha, base_color) 

Creates a Color structure from the specified 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:

ParameterTypeDescription
alphaintThe alpha value for the new Color. Valid values are 0 through 255.
base_colorColorThe Color from which to create the new Color.

Returns

TypeDescription
ColorThe Color that this method creates.

Method: from_argb(alpha, red, green, blue) [static]

 from_argb(alpha, red, green, blue) 

Creates a 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:

ParameterTypeDescription
alphaintThe alpha component. Valid values are 0 through 255.
redintThe red component. Valid values are 0 through 255.
greenintThe green component. Valid values are 0 through 255.
blueintThe blue component. Valid values are 0 through 255.

Returns

TypeDescription
ColorThe Color that this method creates.

Method: from_argb(argb) [static]

 from_argb(argb) 

Creates a Color structure from a 32-bit ARGB value.

Parameters:

ParameterTypeDescription
argbintA value specifying the 32-bit ARGB value.

Returns

TypeDescription
ColorThe Color structure that this method creates.

Method: from_argb(red, green, blue) [static]

 from_argb(red, green, blue) 

Creates a 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:

ParameterTypeDescription
redintThe red component value for the new Color. Valid values are 0 through 255.
greenintThe green component value for the new Color. Valid values are 0 through 255.
blueintThe blue component value for the new Color. Valid values are 0 through 255.

Returns

TypeDescription
ColorThe Color that this method creates.

Method: from_known_color(color) [static]

 from_known_color(color) 

Creates a Color structure from the specified predefined color.

Parameters:

ParameterTypeDescription
colorKnownColorAn element of the KnownColor enumeration.

Returns

TypeDescription
ColorThe Color that this method creates.

Method: from_name(name) [static]

 from_name(name) 

Creates a Color structure from the specified name of a predefined color.

Parameters:

ParameterTypeDescription
namestringA string that is the name of a predefined color. Valid names are the same as the names of the elements of the KnownColor enumeration.

Returns

TypeDescription
ColorThe Color that this method creates.

Method: get_brightness()

 get_brightness() 

Gets the hue-saturation-brightness (HSB) brightness value for this Color structure.

Returns

TypeDescription
floatThe brightness of this Color. The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.

Method: get_hue()

 get_hue() 

Gets the hue-saturation-brightness (HSB) hue value, in degrees, for this Color structure.

Returns

TypeDescription
floatThe hue, in degrees, of this Color. The hue is measured in degrees, ranging from 0.0 through 360.0, in HSB color space.

Method: get_saturation()

 get_saturation() 

Gets the hue-saturation-brightness (HSB) saturation value for this Color structure.

Returns

TypeDescription
floatThe saturation of this Color. The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.

Method: to_argb()

 to_argb() 

Gets the 32-bit ARGB value of this Color structure.

Returns

TypeDescription
intThe 32-bit ARGB value of this Color.

Method: to_cmyk(pixel) [static]

 to_cmyk(pixel) 

The conversion from Color to CMYKColor.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk(pixels).

Parameters:

ParameterTypeDescription
pixelColor

Returns

TypeDescription
CmykColorThe CmykColor[].

Method: to_cmyk(pixels) [static]

 to_cmyk(pixels) 

The conversion from Color to CMYKColor.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk(pixels).

Parameters:

ParameterTypeDescription
pixelsColor[]The pixels of Color type in RGB format.

Returns

TypeDescription
CmykColor[]The CmykColor[].

Method: to_cmyk_color(pixel) [static]

 to_cmyk_color(pixel) 

The conversion from Color to CMYKColor.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk(pixel).

Parameters:

ParameterTypeDescription
pixelColorThe pixel of Color type in RGB format.

Returns

TypeDescription
CmykColorThe CmykColor.

Method: to_cmyk_color_with_def_icc(pixel) [static]

 to_cmyk_color_with_def_icc(pixel) 

The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixel).

Parameters:

ParameterTypeDescription
pixelColorThe pixel of Color type in RGB format.

Returns

TypeDescription
CmykColorThe CmykColor.

Method: to_cmyk_color_with_icc(pixel, rgb_icc_stream, cmyk_icc_stream) [static]

 to_cmyk_color_with_icc(pixel, rgb_icc_stream, cmyk_icc_stream) 

The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color,_io.BufferedRandom,_io.BufferedRandom).

Parameters:

ParameterTypeDescription
pixelColorThe pixel of Color type in RGB format.
rgb_icc_stream_io.BufferedRandomThe stream containing icc rgb profile.
cmyk_icc_stream_io.BufferedRandomThe stream containing icc cmyk profile.

Returns

TypeDescription
CmykColorThe CmykColor[].

Method: to_cmyk_colors(pixels) [static]

 to_cmyk_colors(pixels) 

The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixels).

Parameters:

ParameterTypeDescription
pixelsColor[]The pixels of Color type in RGB format.

Returns

TypeDescription
CmykColor[]The CmykColor[].

Method: to_cmyk_colors_with_def_icc(pixels) [static]

 to_cmyk_colors_with_def_icc(pixels) 

The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixels).

Parameters:

ParameterTypeDescription
pixelsColor[]The pixels of Color type in RGB format.

Returns

TypeDescription
CmykColor[]The CmykColor[].

Method: to_cmyk_colors_with_icc(pixels, rgb_icc_stream, cmyk_icc_stream) [static]

 to_cmyk_colors_with_icc(pixels, rgb_icc_stream, cmyk_icc_stream) 

The conversion from Color to CMYKColor using icc conversion.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color[],_io.BufferedRandom,_io.BufferedRandom).

Parameters:

ParameterTypeDescription
pixelsColor[]The pixels of Color type in RGB format.
rgb_icc_stream_io.BufferedRandomThe stream containing icc rgb profile.
cmyk_icc_stream_io.BufferedRandomThe stream containing icc cmyk profile.

Returns

TypeDescription
CmykColor[]The CmykColor[].

Method: to_cmyk_icc(pixel) [static]

 to_cmyk_icc(pixel) 

The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixel).

Parameters:

ParameterTypeDescription
pixelColorThe pixel of Color type in RGB format.

Returns

TypeDescription
CmykColorThe CmykColor.

Method: to_cmyk_icc(pixel, rgb_icc_stream, cmyk_icc_stream) [static]

 to_cmyk_icc(pixel, rgb_icc_stream, cmyk_icc_stream) 

The conversion from Color to CMYKColor using icc conversion.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color[],_io.BufferedRandom,_io.BufferedRandom).

Parameters:

ParameterTypeDescription
pixelColor
rgb_icc_stream_io.BufferedRandomThe stream containing icc rgb profile.
cmyk_icc_stream_io.BufferedRandomThe stream containing icc cmyk profile.

Returns

TypeDescription
CmykColorThe CmykColor[].

Method: to_cmyk_icc(pixels) [static]

 to_cmyk_icc(pixels) 

The conversion from Color to CMYKColor using icc conversion with default profiles.
This method is deprecated. Please use more effective CmykColorHelper.to_cmyk_icc(pixels).

Parameters:

ParameterTypeDescription
pixelsColor[]The pixels of Color type in RGB format.

Returns

TypeDescription
CmykColor[]The CmykColor[].

Method: to_cmyk_icc(pixels, rgb_icc_stream, cmyk_icc_stream) [static]

 to_cmyk_icc(pixels, rgb_icc_stream, cmyk_icc_stream) 

The conversion from Color to CMYKColor using icc conversion.
This method is deprecated. Please use more effective Aspose.Imaging.CmykColorHelper.ToCmykIcc(Aspose.Imaging.Color[],_io.BufferedRandom,_io.BufferedRandom).

Parameters:

ParameterTypeDescription
pixelsColor[]The pixels of Color type in RGB format.
rgb_icc_stream_io.BufferedRandomThe stream containing icc rgb profile.
cmyk_icc_stream_io.BufferedRandomThe stream containing icc cmyk profile.

Returns

TypeDescription
CmykColor[]The CmykColor[].

Method: to_known_color()

 to_known_color() 

Gets the KnownColor value of this Color structure.

Returns

TypeDescription
KnownColorAn element of the KnownColor enumeration, if the Color is created from a predefined color by using either the Color.from_name(name) method or the Color.from_known_color(color) method; otherwise, 0.