kolaente
3f3d4b1682
Some checks failed
continuous-integration/drone/push Build is failing
Resolves F-591 Related discussion: https://community.vikunja.io/t/assign-a-random-color-to-a-new-label/348/7
21 lines
283 B
TypeScript
21 lines
283 B
TypeScript
|
|
const COLORS = [
|
|
'#ffbe0b',
|
|
'#fd8a09',
|
|
'#fb5607',
|
|
'#ff006e',
|
|
'#efbdeb',
|
|
'#8338ec',
|
|
'#5f5ff6',
|
|
'#3a86ff',
|
|
'#4c91ff',
|
|
'#0ead69',
|
|
'#25be8b',
|
|
'#073b4c',
|
|
'#373f47',
|
|
]
|
|
|
|
export function getRandomColorHex(): string {
|
|
return COLORS[Math.floor(Math.random() * COLORS.length)]
|
|
}
|