Handling when saved tags do not have a color.

This commit is contained in:
Roland 2025-03-28 10:26:54 -06:00
parent 6a2969fa33
commit 47df5a8b52
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -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;