Not all colours are equal, and not all backgrounds are white. What do you do when you're designing an icon for a site with a dark background? You change the background of your favourite icon editor, of course!
It's easy to do: in the colour chooser, choose the colour you want to use for the background, open the "appearance" panel on the bottom right, and click "use current colour" for "background". Voilà!