IColorPalette Class

Summary: The color palette interface.

Module: aspose.imaging

Full Name: aspose.imaging.IColorPalette

Properties

NameTypeAccessDescription
argb_32_entriesintrGets an array of 32-bit ARGB structures.
entriesColor[]rGets an array of Color structures.
entries_countintrGets the entries count.
is_compact_paletteboolrGets a value indicating whether compact palette is used.

Methods

NameDescription
get_argb_32_color(index)Gets the 32-bit ARGB palette color by index.
get_color(index)Gets the palette color by index.
get_nearest_color_index(argb_32_color)Gets the index of the nearest 32-bit ARGB color.
get_nearest_color_index(color)Gets the index of the nearest 32-bit ARGB color.

Method: get_argb_32_color(index)

 get_argb_32_color(index) 

Gets the 32-bit ARGB palette color by index.

Parameters:

ParameterTypeDescription
indexintThe 32-bit ARGB palette color index.

Returns

TypeDescription
intThe color palette entry specified by the index.

Method: get_color(index)

 get_color(index) 

Gets the palette color by index.

Parameters:

ParameterTypeDescription
indexintThe palette color index.

Returns

TypeDescription
ColorThe color palette entry specified by the index.

Method: get_nearest_color_index(argb_32_color)

 get_nearest_color_index(argb_32_color) 

Gets the index of the nearest 32-bit ARGB color.

Parameters:

ParameterTypeDescription
argb_32_colorintThe 32-bit ARGB color.

Returns

TypeDescription
intThe index of the nearest color.

Method: get_nearest_color_index(color)

 get_nearest_color_index(color) 

Gets the index of the nearest 32-bit ARGB color.

Parameters:

ParameterTypeDescription
colorColor

Returns

TypeDescription
intThe index of the nearest color.