mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
change user default color
This commit is contained in:
parent
294fc41aec
commit
8ff062ec8b
@ -3,7 +3,7 @@
|
|||||||
* Used for cursor colors and avatar backgrounds
|
* Used for cursor colors and avatar backgrounds
|
||||||
*/
|
*/
|
||||||
export const getUserColor = (id: string): string => {
|
export const getUserColor = (id: string): string => {
|
||||||
const colors = ['#3B82F6', '#EF4444', '#10B981', '#F59E0B', '#8B5CF6', '#EC4899', '#06B6D4', '#84CC16']
|
const colors = ['#155AEF', '#0BA5EC', '#444CE7', '#7839EE', '#4CA30D', '#0E9384', '#DD2590', '#FF4405', '#D92D20', '#F79009', '#828DAD']
|
||||||
const hash = id.split('').reduce((a, b) => {
|
const hash = id.split('').reduce((a, b) => {
|
||||||
a = ((a << 5) - a) + b.charCodeAt(0)
|
a = ((a << 5) - a) + b.charCodeAt(0)
|
||||||
return a & a
|
return a & a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user