Downloads a satellite image via Google Maps/Earth (these are originally from a variety of aerial photography sources), translates the image into a perceptually uniform color space, runs one of a few different clustering algorithms on the colors in the image searching for a user-supplied number of colors, and returns the resulting color palette.
This version tries to adapt to the changes to the google maps API. For this to work seamlessly, ggmap needs to be working. For more information on that check the ggmap github page. For more information on what google is doing to make money with google maps see their page on the changes.