I think I am getting it, but aren’t we over complicating things? Would the buffer be more memory efficient than double indexes?
Why won’t we just store the colors under indexes 0-X (X is our total number of colors I will use to make tiles, right now we are aiming at 16 or 64 if we include the secondary colors).
Tiles would be made with indexed colors. So when you read them, they have the colors already baked in.
When they go into light/dark we just changed what color this tile displays. Instead of color , it would change to . This would also give us to what colors are displayed, instead of letting the system do it, which might end up making some ugly colors.
You are the programmer, if you say the color generating by code will work, I trust you. Just let me know how I need to store the palette for you to use effectively, and how should I make my tiles