refactor: simplify cross-session messaging
This commit is contained in:
1 parent
0e184965e8
commit
251a1ccd40
78 files changed
+1578
-7569
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export function sessionHandleColor(handleId: string): string {
|
||||
let hash = 2166136261;
|
||||
for (const char of handleId) {
|
||||
hash ^= char.codePointAt(0) ?? 0;
|
||||
hash = Math.imul(hash, 16777619);
|
||||
}
|
||||
const hue = (hash >>> 0) % 360;
|
||||
return `oklch(var(--session-handle-lightness) var(--session-handle-chroma) ${hue})`;
|
||||
}
|
||||
Reference in new issue
Block a user