Color Class
Summary: The color of the pixel.
Module: aspose.psd
Full Name: aspose.psd.Color
Aspose.PSD Version: 24.9.0
Constructors
Name | Description |
---|---|
Color() | Initializes a new instance of the Color class |
Properties
Name | Type | Access | Description |
---|---|---|---|
a | byte | r | Gets the alpha component value of this Color structure. |
alice_blue [static] | Color | r | Gets a system-defined color. |
antique_white [static] | Color | r | Gets a system-defined color. |
aqua [static] | Color | r | Gets a system-defined color. |
aquamarine [static] | Color | r | Gets a system-defined color. |
azure [static] | Color | r | Gets a system-defined color. |
b | byte | r | Gets the blue component value of this Color structure. |
beige [static] | Color | r | Gets a system-defined color. |
bisque [static] | Color | r | Gets a system-defined color. |
black [static] | Color | r | Gets a system-defined color. |
blanched_almond [static] | Color | r | Gets a system-defined color. |
blue [static] | Color | r | Gets a system-defined color. |
blue_violet [static] | Color | r | Gets a system-defined color. |
brown [static] | Color | r | Gets a system-defined color. |
burly_wood [static] | Color | r | Gets a system-defined color. |
cadet_blue [static] | Color | r | Gets a system-defined color. |
chartreuse [static] | Color | r | Gets a system-defined color. |
chocolate [static] | Color | r | Gets a system-defined color. |
coral [static] | Color | r | Gets a system-defined color. |
cornflower_blue [static] | Color | r | Gets a system-defined color. |
cornsilk [static] | Color | r | Gets a system-defined color. |
crimson [static] | Color | r | Gets a system-defined color. |
cyan [static] | Color | r | Gets a system-defined color. |
dark_blue [static] | Color | r | Gets a system-defined color. |
dark_cyan [static] | Color | r | Gets a system-defined color. |
dark_goldenrod [static] | Color | r | Gets a system-defined color. |
dark_gray [static] | Color | r | Gets a system-defined color. |
dark_green [static] | Color | r | Gets a system-defined color. |
dark_khaki [static] | Color | r | Gets a system-defined color. |
dark_magenta [static] | Color | r | Gets a system-defined color. |
dark_olive_green [static] | Color | r | Gets a system-defined color. |
dark_orange [static] | Color | r | Gets a system-defined color. |
dark_orchid [static] | Color | r | Gets a system-defined color. |
dark_red [static] | Color | r | Gets a system-defined color. |
dark_salmon [static] | Color | r | Gets a system-defined color. |
dark_sea_green [static] | Color | r | Gets a system-defined color. |
dark_slate_blue [static] | Color | r | Gets a system-defined color. |
dark_slate_gray [static] | Color | r | Gets a system-defined color. |
dark_turquoise [static] | Color | r | Gets a system-defined color. |
dark_violet [static] | Color | r | Gets a system-defined color. |
deep_pink [static] | Color | r | Gets a system-defined color. |
deep_sky_blue [static] | Color | r | Gets a system-defined color. |
dim_gray [static] | Color | r | Gets a system-defined color. |
dodger_blue [static] | Color | r | Gets a system-defined color. |
empty [static] | Color | r | Gets an empty Color. |
firebrick [static] | Color | r | Gets a system-defined color. |
floral_white [static] | Color | r | Gets a system-defined color. |
forest_green [static] | Color | r | Gets a system-defined color. |
fuchsia [static] | Color | r | Gets a system-defined color. |
g | byte | r | Gets the green component value of this Color structure. |
gainsboro [static] | Color | r | Gets a system-defined color. |
ghost_white [static] | Color | r | Gets a system-defined color. |
gold [static] | Color | r | Gets a system-defined color. |
goldenrod [static] | Color | r | Gets a system-defined color. |
gray [static] | Color | r | Gets a system-defined color. |
green [static] | Color | r | Gets a system-defined color. |
green_yellow [static] | Color | r | Gets a system-defined color. |
honeydew [static] | Color | r | Gets a system-defined color. |
hot_pink [static] | Color | r | Gets a system-defined color. |
indian_red [static] | Color | r | Gets a system-defined color. |
indigo [static] | Color | r | Gets a system-defined color. |
is_empty | bool | r | Gets a value indicating whether this Color structure is uninitialized. |
is_known_color | bool | r | Gets a value indicating whether this Color structure is a predefined color. Predefined colors are represented by the elements of the KnownColor enumeration. |
is_named_color | bool | r | Gets a value indicating whether this Color structure is a named color or a member of the KnownColor enumeration. |
ivory [static] | Color | r | Gets a system-defined color. |
khaki [static] | Color | r | Gets a system-defined color. |
lavender [static] | Color | r | Gets a system-defined color. |
lavender_blush [static] | Color | r | Gets a system-defined color. |
lawn_green [static] | Color | r | Gets a system-defined color. |
lemon_chiffon [static] | Color | r | Gets a system-defined color. |
light_blue [static] | Color | r | Gets a system-defined color. |
light_coral [static] | Color | r | Gets a system-defined color. |
light_cyan [static] | Color | r | Gets a system-defined color. |
light_goldenrod_yellow [static] | Color | r | Gets a system-defined color. |
light_gray [static] | Color | r | Gets a system-defined color. |
light_green [static] | Color | r | Gets a system-defined color. |
light_pink [static] | Color | r | Gets a system-defined color. |
light_salmon [static] | Color | r | Gets a system-defined color. |
light_sea_green [static] | Color | r | Gets a system-defined color. |
light_sky_blue [static] | Color | r | Gets a system-defined color. |
light_slate_gray [static] | Color | r | Gets a system-defined color. |
light_steel_blue [static] | Color | r | Gets a system-defined color. |
light_yellow [static] | Color | r | Gets a system-defined color. |
lime [static] | Color | r | Gets a system-defined color. |
lime_green [static] | Color | r | Gets a system-defined color. |
linen [static] | Color | r | Gets a system-defined color. |
magenta [static] | Color | r | Gets a system-defined color. |
maroon [static] | Color | r | Gets a system-defined color. |
medium_aquamarine [static] | Color | r | Gets a system-defined color. |
medium_blue [static] | Color | r | Gets a system-defined color. |
medium_orchid [static] | Color | r | Gets a system-defined color. |
medium_purple [static] | Color | r | Gets a system-defined color. |
medium_sea_green [static] | Color | r | Gets a system-defined color. |
medium_slate_blue [static] | Color | r | Gets a system-defined color. |
medium_spring_green [static] | Color | r | Gets a system-defined color. |
medium_turquoise [static] | Color | r | Gets a system-defined color. |
medium_violet_red [static] | Color | r | Gets a system-defined color. |
midnight_blue [static] | Color | r | Gets a system-defined color. |
mint_cream [static] | Color | r | Gets a system-defined color. |
misty_rose [static] | Color | r | Gets a system-defined color. |
moccasin [static] | Color | r | Gets a system-defined color. |
name | string | r | Gets the name of this Color. |
navajo_white [static] | Color | r | Gets a system-defined color. |
navy [static] | Color | r | Gets a system-defined color. |
old_lace [static] | Color | r | Gets a system-defined color. |
olive [static] | Color | r | Gets a system-defined color. |
olive_drab [static] | Color | r | Gets a system-defined color. |
orange [static] | Color | r | Gets a system-defined color. |
orange_red [static] | Color | r | Gets a system-defined color. |
orchid [static] | Color | r | Gets a system-defined color. |
pale_goldenrod [static] | Color | r | Gets a system-defined color. |
pale_green [static] | Color | r | Gets a system-defined color. |
pale_turquoise [static] | Color | r | Gets a system-defined color. |
pale_violet_red [static] | Color | r | Gets a system-defined color. |
papaya_whip [static] | Color | r | Gets a system-defined color. |
peach_puff [static] | Color | r | Gets a system-defined color. |
peru [static] | Color | r | Gets a system-defined color. |
pink [static] | Color | r | Gets a system-defined color. |
plum [static] | Color | r | Gets a system-defined color. |
powder_blue [static] | Color | r | Gets a system-defined color. |
purple [static] | Color | r | Gets a system-defined color. |
r | byte | r | Gets the red component value of this Color structure. |
red [static] | Color | r | Gets a system-defined color. |
rosy_brown [static] | Color | r | Gets a system-defined color. |
royal_blue [static] | Color | r | Gets a system-defined color. |
saddle_brown [static] | Color | r | Gets a system-defined color. |
salmon [static] | Color | r | Gets a system-defined color. |
sandy_brown [static] | Color | r | Gets a system-defined color. |
sea_green [static] | Color | r | Gets a system-defined color. |
sea_shell [static] | Color | r | Gets a system-defined color. |
sienna [static] | Color | r | Gets a system-defined color. |
silver [static] | Color | r | Gets a system-defined color. |
sky_blue [static] | Color | r | Gets a system-defined color. |
slate_blue [static] | Color | r | Gets a system-defined color. |
slate_gray [static] | Color | r | Gets a system-defined color. |
snow [static] | Color | r | Gets a system-defined color. |
spring_green [static] | Color | r | Gets a system-defined color. |
steel_blue [static] | Color | r | Gets a system-defined color. |
tan [static] | Color | r | Gets a system-defined color. |
teal [static] | Color | r | Gets a system-defined color. |
thistle [static] | Color | r | Gets a system-defined color. |
tomato [static] | Color | r | Gets a system-defined color. |
transparent [static] | Color | r | Gets a system-defined color. |
turquoise [static] | Color | r | Gets a system-defined color. |
violet [static] | Color | r | Gets a system-defined color. |
wheat [static] | Color | r | Gets a system-defined color. |
white [static] | Color | r | Gets a system-defined color. |
white_smoke [static] | Color | r | Gets a system-defined color. |
yellow [static] | Color | r | Gets a system-defined color. |
yellow_green [static] | Color | r | Gets a system-defined color. |
Methods
Name | Description |
---|---|
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_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.PSD.CmykColorHelper.ToCmykIcc(Aspose.PSD.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.PSD.CmykColorHelper.ToCmykIcc(Aspose.PSD.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:
Parameter | Type | Description |
---|---|---|
alpha | int | The alpha value for the new Color. Valid values are 0 through 255. |
base_color | Color | The Color from which to create the new Color. |
Returns
Type | Description |
---|---|
Color | The 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:
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
Type | Description |
---|---|
Color | The Color that this method creates. |
Method: from_argb(argb) [static]
from_argb(argb)
Creates a Color structure from a 32-bit ARGB value.
Parameters:
Parameter | Type | Description |
---|---|---|
argb | int | A value specifying the 32-bit ARGB value. |
Returns
Type | Description |
---|---|
Color | The 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:
Parameter | Type | Description |
---|---|---|
red | int | The red component value for the new Color. Valid values are 0 through 255. |
green | int | The green component value for the new Color. Valid values are 0 through 255. |
blue | int | The blue component value for the new Color. Valid values are 0 through 255. |
Returns
Type | Description |
---|---|
Color | The 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:
Parameter | Type | Description |
---|---|---|
color | KnownColor | An element of the KnownColor enumeration. |
Returns
Type | Description |
---|---|
Color | The 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:
Parameter | Type | Description |
---|---|---|
name | string | A 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
Type | Description |
---|---|
Color | The Color that this method creates. |
Method: get_brightness()
get_brightness()
Gets the hue-saturation-brightness (HSB) brightness value for this Color structure.
Returns
Type | Description |
---|---|
float | The 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
Type | Description |
---|---|
float | The 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
Type | Description |
---|---|
float | The 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
Type | Description |
---|---|
int | The 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:
Parameter | Type | Description |
---|---|---|
pixel | Color |
Returns
Type | Description |
---|---|
CmykColor | The |
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:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The pixels of Color type in RGB format. |
Returns
Type | Description |
---|---|
CmykColor[] | The |
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:
Parameter | Type | Description |
---|---|---|
pixel | Color | The pixel of Color type in RGB format. |
Returns
Type | Description |
---|---|
CmykColor | The 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.PSD.CmykColorHelper.ToCmykIcc(Aspose.PSD.Color[],_io.BufferedRandom,_io.BufferedRandom).
Parameters:
Parameter | Type | Description |
---|---|---|
pixel | Color | |
rgb_icc_stream | _io.BufferedRandom | The stream containing icc rgb profile. |
cmyk_icc_stream | _io.BufferedRandom | The stream containing icc cmyk profile. |
Returns
Type | Description |
---|---|
CmykColor | The |
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:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The pixels of Color type in RGB format. |
Returns
Type | Description |
---|---|
CmykColor[] | The |
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.PSD.CmykColorHelper.ToCmykIcc(Aspose.PSD.Color[],_io.BufferedRandom,_io.BufferedRandom).
Parameters:
Parameter | Type | Description |
---|---|---|
pixels | Color[] | The pixels of Color type in RGB format. |
rgb_icc_stream | _io.BufferedRandom | The stream containing icc rgb profile. |
cmyk_icc_stream | _io.BufferedRandom | The stream containing icc cmyk profile. |
Returns
Type | Description |
---|---|
CmykColor[] | The |
Method: to_known_color()
to_known_color()
Gets the KnownColor value of this Color structure.
Returns
Type | Description |
---|---|
KnownColor | An 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. |