system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How did the gameboy color and the gameboy advance 'know' the colors they had to use for original gameboy games that were black and white?
gpt
The gameboy color contained a small database of known games with ideal color palette for it (chosen between 12 palettes that the gameboy color could offer for uncolored games.)

If a game was not in its database, then it didn't choose. The default was the green-themed palette.

Games are identified with a small, unique number, which uniqueness was ensured by Nintendo attributing them for the right to make cartridges of the game.