Dopplr colours
Summary
The concept of "Dopplr colours," originating from the defunct travel website Dopplr, involves assigning a unique accent color to cities. These colors were historically visible as map borders on Dopplr city pages, as archived by the Internet Archive. The assignment algorithm, though not officially documented, is understood to be MD5-based. It calculates the MD5 hash of a string (e.g., a city name or domain name), then extracts the first six characters to form a hexadecimal color value. For instance, the Dopplr color for "jamesg.blog" is `#e228f3`. This method allows for color generation for any string, not exclusively city names. The IndieWeb community has adopted this system to visually represent cities in its timeline of in-person IndieWebCamp events.
Key takeaway
For creative technologists or developers seeking a simple, deterministic method to assign unique, consistent colors to arbitrary strings or entities, consider implementing the Dopplr color algorithm. This approach, using an MD5 hash and extracting the first six hexadecimal characters, provides a straightforward way to visually differentiate items like cities in a timeline or user-generated content, enhancing data representation without complex color palette management.
Key insights
Dopplr colors are generated by taking the first six characters of an MD5 hash of a string.
Principles
- MD5 hashes provide consistent outputs.
- Hexadecimal values define web colors.
Method
Calculate the MD5 hash of a given string, then extract the first six characters of the hexadecimal hash to form a color code. This code can be prefixed with "#" for web use.
In practice
- Generate unique colors for data entries.
- Visually distinguish timeline events.
- Apply consistent branding to strings.
Topics
- Dopplr Colours
- MD5 Hashing
- Hexadecimal Color Codes
- IndieWeb Community
- Code Implementation
Best for: Software Engineer, Creative Technologist
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by James' Coffee Blog.