Upgrade graphic of the chat

This commit is contained in:
GRL 2021-07-12 11:59:05 +02:00
parent 3cfbcc6b02
commit b9a2433283
4 changed files with 19 additions and 5 deletions

View file

@ -1,5 +1,9 @@
export function getRandomColor(): string {
return hsv_to_rgb(Math.random(), 0.5, 0.95);
const golden_ratio_conjugate = 0.618033988749895;
let hue = Math.random();
hue += golden_ratio_conjugate;
hue %= 1;
return hsv_to_rgb(hue, 0.5, 0.95);
}
//todo: test this.