AsepritePalette

ceramic.AsepritePalette (Class)

Represents a color palette from an Aseprite file.

Aseprite supports indexed color mode where each pixel references a color from a palette. This class stores the palette entries and provides utilities for color lookup.

The palette is stored as a map from color indices to ARGB color values, allowing efficient lookup during rendering of indexed color sprites.

See: AsepriteData for the parent data structure, PaletteChunk for the raw palette data from the file

Static Members

Creates an AsepritePalette from raw palette chunk data.

Converts the palette entries from the file format into an efficient integer map for color lookups. Colors are packed as 32-bit ARGB values.

Name Type Description
chunk ase.chunks.PaletteChunk The palette chunk from the Aseprite file
Returns Description
AsepritePalette A new AsepritePalette instance with indexed colors

Instance Members

ase
entries: IntIntMap

Map from palette index to ARGB color value. Keys are palette indices (0-255 for 8-bit indexed color). Values are 32-bit ARGB colors stored as integers.


The raw palette chunk data from the Aseprite file. Contains additional metadata like color names if present.


ase
new(entries: IntIntMap, chunk: ase.chunks.PaletteChunk): Void
Name Type Description
entries IntIntMap * Map from palette index to ARGB color value. Keys are palette indices (0-255 for 8-bit indexed color). Values are 32-bit ARGB colors stored as integers.
chunk ase.chunks.PaletteChunk * The raw palette chunk data from the Aseprite file. Contains additional metadata like color names if present.

Metadata

Name Parameters
:structInit -