Этап 2

This commit is contained in:
2026-03-29 15:34:33 +03:00
parent 09d52aa973
commit 08b9039b58
19 changed files with 872 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
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);
}