Table of Contents

Class PopularityPaletteWithThreshold

Namespace
Terminal.Gui.Drawing
Assembly
Terminal.Gui.dll

Simple fast palette building algorithm which uses the frequency that a color is seen to determine whether it will appear in the final palette. Includes a threshold whereby colors will be considered 'the same'. This reduces the chance of underrepresented colors being missed completely.

public class PopularityPaletteWithThreshold : IPaletteBuilder
Inheritance
PopularityPaletteWithThreshold
Implements
Inherited Members

Constructors

PopularityPaletteWithThreshold(IColorDistance, double)

Creates a new instance with the given color grouping parameters.

Methods

BuildPalette(List<Color>?, int)

Reduce the number of colors to maxColors (or less) using an appropriate selection algorithm.