tilepalettemapper
– Remaps color indices from the source bitmap to alternate indices on a
per-tile basis. This allows for altering coloring of tiles based on
their tilegrid location. It also allows for using a limited color
bitmap with a wider array of colors.
Available on these boards
- class tilepalettemapper.TilePaletteMapper(palette: displayio.Palette, input_color_count: int)
Create a TilePaletteMApper object to store a set of color mappings for tiles.
- Parameters:
pixel_shader (Union[displayio.Palette, displayio.ColorConverter]) – The palette or ColorConverter to get mapped colors from.
input_color_count (int) – The number of colors in in the input bitmap.
- pixel_shader: displayio.Palette | displayio.ColorConverter
The palette or ColorConverter that the mapper uses.
- tilegrid: displayio.TileGrid
The TileGrid that the TilePaletteMapper is used with.