diff options
Diffstat (limited to 'ui/src/utils.ts')
-rw-r--r-- | ui/src/utils.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 058be6ae..8e456cc5 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -768,8 +768,19 @@ export function postSort( } } -export const colorList: Array<string> = [...Array(10)].map(() => randomHsl()); +export const colorList: Array<string> = [ + hsl(0), + hsl(100), + hsl(150), + hsl(200), + hsl(250), + hsl(300), +]; + +function hsl(num: number) { + return `hsla(${num}, 35%, 50%, 1)`; +} -export function randomHsl() { +function randomHsl() { return `hsla(${Math.random() * 360}, 100%, 50%, 1)`; } |