Feature Request: Additional Color Constraint Options

This is admittedly a bit niche, but it would be very helpful when optimizing hicolor images for the Game Boy Color.
For some background information, the Game Boy Color has a maximum of 8 background palettes that can be applied to any of the 8x8 tiles onscreen. Each palette has 4 colors. This means that usually, each 8x8 section of a tilemap can contain at most 4 unique colors, and a maximum of 32 colors onscreen at once. However, there is a trick that allows more colors to be displayed, by swapping out up to 16 colors* at the end of each scanline. When this trick is used, each 8x1 section of a tilemap can contain at most 4 unique colors, and the maximum number of colors onscreen at once is much higher. However, each row of the screen is still limited to a maximum of 32 colors, since colors can only be swapped out at the end of a row.
I would like if there were additional color constraint options that could be used at the same time as the current ones:
Limit colors per row: This can be somewhat simulated by using “Limit colors per tile” and setting the vertical size to 1 and the horizontal size to the width of the screen, but this prevents also limiting the colors of the 8x1 “tiles” to 4 at the same time.
Limit changed colors per row: Limit how many colors of a row can be different from colors of the previous row.

*16 is the maximum number of colors that can be swapped at the end of a row on the Game Boy Color, but this is mostly only feasible when displaying static images. If used during gameplay, the actual limit will be lower, due to both CPU costs, and some complicated stuff related to how the hardware handles rendering when sprites or the window are onscreen.

Indeed, quite niche. As mentioned in some other thread, it’s planned to create a better plugin interface/API. This could then be used to do such things, I guess.

1 Like