Skip to content

Commit b8d804b

Browse files
Update src/lib/auth.js
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 110cd5b commit b8d804b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class AuthService {
130130
"#4CAF50",
131131
"#FF9800",
132132
];
133-
ctx.fillStyle = colors[Math.floor(Math.random() * colors.length)];
133+
ctx.fillStyle = colors[name.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0) % colors.length];
134134
ctx.fillRect(0, 0, 100, 100);
135135

136136
ctx.fillStyle = "#ffffff";

0 commit comments

Comments
 (0)