IPalette Interface

Represents the properties of a Palette instance that can be accessed from custom color lookup functions.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.0-rc.1
C#
public interface IPalette

Properties

AlphaThreshold If this IPalette has a transparent entry, then gets a threshold value for the Color32.A field, under which lookup operations will return the first transparent color in the palette.
BackColor Gets the background color. Relevant only if this IPalette does not contain partially transparent colors. If a lookup operation is performed with a color whose Color32.A field is equal to or greater than AlphaThreshold, then the color will be blended with this color before performing the lookup.
Count Gets the number of color entries in the current IPalette.
HasAlpha Gets whether the palette contains at least one entry that is not fully opaque.
IsGrayscale Gets whether the palette consists of grayscale entries only.
Item Gets the color entry of this IPalette at the specified index.
WorkingColorSpace Gets the preferred color space when this IPalette instance performs blending and measuring distance when looking for a nearest color.

See Also