Most of the Asteroids in the game are links - they use those same CSS rules to color themselves based on whether you've visited them or not.
Script on the page can't tell what color the asteroids are, but it can tell what asteroids you've clicked on. By making the visited-link color the same as the background color of the webpage, we get the user to give away the color of the links, because they'd only be clicking on the links that they can see - the ones with a color different to the background.