Add .Palette() for PaletteContainer

This commit is contained in:
Tnze
2023-04-27 20:17:58 +08:00
parent e435ab18f7
commit eff554cde1

View File

@ -158,6 +158,13 @@ func (p *PaletteContainer[T]) WriteTo(w io.Writer) (n int64, err error) {
}.WriteTo(w) }.WriteTo(w)
} }
// Palette export the raw palette values for @maxsupermanhd.
// Others shouldn't call this because this might be removed
// after max doesn't need it anymore.
func (p *PaletteContainer[T]) Palette() []T {
return p.palette.export()
}
type paletteCfg[T State] interface { type paletteCfg[T State] interface {
bits(int) int bits(int) int
create(bits int) palette[T] create(bits int) palette[T]