diff options
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(); |