What method does Microsoft utilize to assign colors to contacts in their applications?
I've searched online with no luck in finding an answer.
In programs like Outlook or Android, when a new contact is added without an image for the avatar, Microsoft automatically assigns a colored circle with initials. I am working on a project where this feature could be very helpful.
How exactly does Microsoft accomplish this? What is the underlying logic behind it? Is there a specific color assigned to each initial in the alphabet? It seems unlikely, as my contacts Leo and Laura have different colors, while Laura and Rick share the same one.
Take a look at some examples below. Notice how the colors vary inconsistently across different initials: