mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-07 11:37:26 +02:00
🐛 Switch to icon for YouAvatar
This commit is contained in:
parent
a6bb357acc
commit
c4b9edf297
2 changed files with 6 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue