AsepritePalette
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.
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
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.
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 |
- |