
The Oracle games apply a mathematical formula to the palette values as they're being written to the GBC's palette registers when they detect that they're running on a gba so the colors look correct on the darker screen. I do not care about the gba detection part, I'm looking to take the mathematical formula it applies and put it in Link's Awakening. If you run the oracle games in a debugger you'll see what I'm talking about, the code branches off into a separate section of code when it writes to FF68-FF6B depending on the value in FF96 (the address where the game stores the gba detection flag after the initial boot).
ie. You change the palette values at 0x5c008 in Oracle of Ages to 28 32 BE 13 00 31 00 00, when you run the game with the gba detect flag set those values become 30 53 FF 2B 00 52 00 00 in vram.