namespace SoulstormReplayReader.Core.Models;

public readonly struct ReplayColor
{
    public readonly byte A;
    public readonly byte R;
    public readonly byte G;
    public readonly byte B;

    private ReplayColor(byte a, byte r, byte g, byte b)
    {
        A = a;
        R = r;
        G = g;
        B = b;
    }

    public static ReplayColor FromArgb(params byte[] argb) => new(argb[0], argb[1], argb[2], argb[3]);

    public static ReplayColor FromBgra(params byte[] bgra) => new(bgra[3], bgra[2], bgra[1], bgra[0]);

    public readonly override string ToString() => $"{A} {R} {G} {B}";
}