This may be closer to what you might be looking for.
Changing Palette of Sprites/Backgrounds Dynamically? : r/gamemaker (reddit.com)
Retro Palette Swapper by Pixelated Pope | GameMaker: Marketplace
Can I use a sprite when drawing a global variable? : r/gamemaker (reddit.com)