color is a Windows command. It does not exist on Unix/Linux operating systems and OnlineGDB runs on some sort of Unix/Linux server.
Check this out to learn how to change the color of your output on a Linux console.