diff --git a/webui-src/app/chat/chat.js b/webui-src/app/chat/chat.js
index 6f6f57a..578fd3c 100644
--- a/webui-src/app/chat/chat.js
+++ b/webui-src/app/chat/chat.js
@@ -56,6 +56,16 @@ function sortLobbies(lobbies) {
return []; // return empty array instead of undefined
}
+function getNicknameColor(id, name) {
+ const hashString = id && id !== '00000000000000000000000000000000' ? id : (name || '');
+ let hash = 0;
+ for (let i = 0; i < hashString.length; i++) {
+ hash = hashString.charCodeAt(i) + ((hash << 5) - hash);
+ }
+ const hue = Math.abs(hash) % 360;
+ return `hsl(${hue}, 75%, 35%)`;
+}
+
// ***************************** models ***********************************
const MobileState = {
@@ -191,6 +201,20 @@ const Message = () => {
const text = (msg.msg || msg.message || '')
.replaceAll('
', '\n')
.replace(new RegExp('