setPalette method
Sets a custom color in the palette.
Args: paletteIndex (PaletteColors): The palette index to set the color for. newColor (Color): The new color to set.
Implementation
Future<void> setPalette(PaletteColors paletteIndex, Color newColor) async {
colorPaletteMapping[paletteIndex] = newColor;
await frame.runLua(
"frame.display.assign_color(${paletteIndex.name},${newColor.red},${newColor.green},${newColor.blue})",
checked: true);
}