diff options
author | bobzel <zzzman@gmail.com> | 2022-04-12 11:00:01 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-04-12 11:00:01 -0400 |
commit | 4b6e16e29b50b492b0a8cbdf32414c7a626f68bd (patch) | |
tree | 35a2f6f45caa7967c1f415b27e8a3ab5a16752b2 /src | |
parent | e8938d5d7b889551c1d32bcf5385e369ed67cea5 (diff) |
changed lightOrDark for 'transparent' to return gray.
Diffstat (limited to 'src')
-rw-r--r-- | src/Utils.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index b280badd7..77095005b 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -603,6 +603,7 @@ export function DashColor(color: string) { } export function lightOrDark(color: any) { + if (color === "transparent") return "gray"; const nonAlphaColor = color.startsWith("#") ? (color as string).substring(0, 7) : color.startsWith("rgba") ? color.replace(/,.[^,]*\)/, ")").replace("rgba", "rgb") : color; const col = DashColor(nonAlphaColor).rgb(); |