Dopplr City Colors

by Ian Kennedy on March 18, 2009

in Travel, User Interface

dopplr colors

Did you know that dopplr assigns a unique color to each city? Neither did I. It’s not just random either – there’s an algorithm at play here. From the dopplr blog:

We wanted a deterministic RGB colour value for each city. At first, we tried mapping the latitude and longitude of a city to a point in colour space, but we found that this made neighbouring cities too similar in colour. This means that people who travel frequently between Glasgow and Edinburgh wouldn’t clearly see the difference in colour between the two. Also, since so much of the Earth’s surface is covered in water rather than cities, it leads to a sparse use of the potential colour space. In the end, we went with a much simpler approach: we take the MD5 digest of the city’s name, convert it to hex and take the first 6 characters as a CSS RGB value.

So now you know why San Francisco is pink, Helsinki is brown, and Berlin is red.

Reblog this post [with Zemanta]
blog comments powered by Disqus

Previous post: Yahoo Developer Network, Points for Style

Next post: Calacanis on Value of twitter