Upgrade graphic of the chat
This commit is contained in:
parent
3cfbcc6b02
commit
b9a2433283
4 changed files with 19 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue