🐛 Switch to icon for YouAvatar

This commit is contained in:
Luke Vella 2024-09-17 21:17:56 +01:00
parent a6bb357acc
commit c4b9edf297
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C
2 changed files with 6 additions and 8 deletions

View file

@ -49,13 +49,10 @@ const colorPairs = [
{ bg: "#EBE6FF", text: "#4800BD" }, // Light indigo
];
export function getColor(seed?: string): {
export function getColor(seed: string): {
bgColor: string;
textColor: string;
} {
if (!seed) {
return { bgColor: "#E6F4FF", textColor: "#0065BD" };
}
let hash = 0;
for (let i = 0; i < seed.length; i++) {
hash = seed.charCodeAt(i) + ((hash << 5) - hash);