Class ImageBuffer.ColorPaletteOptions
The settings consumed by ExtractColorPalette(ColorPaletteOptions). Every value clamps silently to its valid range on assignment, so a UI control or a wire request can bind directly; the defaults describe a photograph or an illustration well and are what a caller with no opinion should use.
public sealed class ImageBuffer.ColorPaletteOptions
- Inheritance
-
ImageBuffer.ColorPaletteOptions
- Inherited Members
Fields
- MaxColorsLimit
The largest MaxColors accepted.
Properties
- MaxColors
The most colors the palette may hold, 1 to MaxColorsLimit (default 6). The clustering starts from this many groups; merging and pruning can only bring the count down.
- MaxSamplePixels
The pixel budget the analysis reads (1 024 to 4 194 304, default 65 536). A larger image is box-averaged down to at most this many samples, so the cost is bounded whatever the source size and every source pixel still weighs in.
- MergeDistance
Two palette entries closer than this CIEDE2000 distance (0 to 40, default 12) are one color and merge. Around 10-12 the two are shades of the same paint; lower it to keep close shades apart, raise it for a coarser palette.
- MinAlpha
Pixels of an RGBA image whose alpha is below this value (default 128) are transparent and take no part: a cutout's palette is the subject's, not the checkerboard's. Ignored for images without an alpha channel.
- MinShare
The smallest share of the image (0 to 0.5 of its opaque pixels) a color must cover to be listed (default 0.02). Colors below it are dropped: a two-percent speck is not part of what an image "is".