Accepted answer

There's no need (and it would be pretty difficult and somewhat expensive computationally) to figure out the inverse of the landmass. But you can just color the background.

I.e you can use CSS:

svg {
  background: lightBlue;

or you can prepend a <rect> element with a blue fill behind the map:

  .attr('width', mapWidth)
  .attr('height', mapHeight)
  .attr('fill', 'lightBlue')


Just want to add to this: in order to only color the globe itself you have to make your svg a circle using border-radius. The result looks great, though:

Related Query