mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-24 17:06:18 -05:00
Handling when saved tags do not have a color.
This commit is contained in:
parent
6a2969fa33
commit
47df5a8b52
1 changed files with 3 additions and 0 deletions
|
|
@ -1897,6 +1897,9 @@ export function mergeDeep(target, source) {
|
|||
|
||||
export function getDistinctColor(hexColors) {
|
||||
function hexToHSL(hex) {
|
||||
if (!hex) {
|
||||
return {h: 0, s: 0, l: 0};
|
||||
}
|
||||
let r = parseInt(hex.slice(1, 3), 16) / 255;
|
||||
let g = parseInt(hex.slice(3, 5), 16) / 255;
|
||||
let b = parseInt(hex.slice(5, 7), 16) / 255;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue