aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts1
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();