IPaletteBuilder.cs 706 B

1234567891011121314151617
  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">Color of every pixel in the image. Contains duplication in order
  12. /// to support algorithms that weigh how common a color is.</param>
  13. /// <param name="maxColors">The maximum number of colours that should be represented.</param>
  14. /// <returns></returns>
  15. List<Color> BuildPalette (List<Color> colors, int maxColors);
  16. }