Changed the avatar color to checkmate blue color

This commit is contained in:
Shalini M
2024-12-16 17:08:27 +05:30
parent 265af61100
commit e30b64bed3

View File

@@ -9,19 +9,8 @@ import { useEffect, useState } from "react";
* @returns {string}
*/
const stringToColor = (string) => {
let hash = 0;
let i;
for (i = 0; i < string.length; i += 1) {
hash = string.charCodeAt(i) + ((hash << 5) - hash);
}
let color = "#";
for (i = 0; i < 3; i += 1) {
const value = (hash >> (i * 8)) & 0xff;
color += `00${value.toString(16)}`.slice(-2);
}
return color;
return "#156EEF";
};
/**