mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Adjust default quantizer
This commit is contained in:
@@ -28,7 +28,7 @@ public class ColorQuantizer
|
||||
/// <summary>
|
||||
/// Gets or sets the algorithm used to build the <see cref="Palette"/>.
|
||||
/// </summary>
|
||||
public IPaletteBuilder PaletteBuildingAlgorithm { get; set; } = new PopularityPaletteWithThreshold (new EuclideanColorDistance (),5) ;
|
||||
public IPaletteBuilder PaletteBuildingAlgorithm { get; set; } = new PopularityPaletteWithThreshold (new EuclideanColorDistance (),8) ;
|
||||
|
||||
private readonly ConcurrentDictionary<Color, int> _nearestColorCache = new ();
|
||||
|
||||
@@ -46,6 +46,7 @@ public class ColorQuantizer
|
||||
}
|
||||
}
|
||||
|
||||
_nearestColorCache.Clear ();
|
||||
Palette = PaletteBuildingAlgorithm.BuildPalette (allColors, MaxColors);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user