Files
Minint/Minint.Core/Services/IPaletteService.cs
2026-03-29 15:34:33 +03:00

24 lines
768 B
C#

using Minint.Core.Models;
namespace Minint.Core.Services;
public interface IPaletteService
{
/// <summary>
/// Returns the index of <paramref name="color"/> in the document palette.
/// If the color is not present, appends it and returns the new index.
/// </summary>
int EnsureColor(MinintDocument document, RgbaColor color);
/// <summary>
/// Finds index of an exact color match, or returns -1 if not found.
/// </summary>
int FindColor(MinintDocument document, RgbaColor color);
/// <summary>
/// Removes unused colors from the palette and remaps all layer pixel indices.
/// Index 0 (transparent) is always preserved.
/// </summary>
void CompactPalette(MinintDocument document);
}