IPaletteBuilder.cs 744 B

12345678910111213141516171819
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Builds a palette of a given size for a given set of input colors.
  4. /// </summary>
  5. public interface IPaletteBuilder
  6. {
  7. /// <summary>
  8. /// Reduce the number of <paramref name="colors"/> to <paramref name="maxColors"/> (or less)
  9. /// using an appropriate selection algorithm.
  10. /// </summary>
  11. /// <param name="colors">
  12. /// Color of every pixel in the image. Contains duplication in order
  13. /// to support algorithms that weigh how common a color is.
  14. /// </param>
  15. /// <param name="maxColors">The maximum number of colours that should be represented.</param>
  16. /// <returns></returns>
  17. List<Color> BuildPalette (List<Color> colors, int maxColors);
  18. }