Palette(Palette, WorkingColorSpace, Color32, Byte) Constructor

Initializes a new instance of the Palette class from another palette using new backColor and alphaThreshold values and color space preference.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.1.1
C#
public Palette(
	Palette palette,
	WorkingColorSpace workingColorSpace,
	Color32 backColor,
	byte alphaThreshold
)

Parameters

palette  Palette
The original Palette to get the colors from.
workingColorSpace  WorkingColorSpace
Specifies the desired color space to be used by the GetNearestColor and GetNearestColorIndex methods for blending and measuring color distance. If the original palette uses a custom lookup function, then the value of this parameter might be ignored.
backColor  Color32
The desired BackColor of the new Palette. The Color32.A field of the background color is ignored.
alphaThreshold  Byte
The desired AlphaThreshold of the new Palette.

Remarks

  Tip

See the Remarks section of the WorkingColorSpace enumeration for details and image examples about using the different color spaces in various operations.

Exceptions

ArgumentNullExceptionpalette is .
ArgumentOutOfRangeExceptionworkingColorSpace is not one of the defined values.

See Also