aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-04-12 11:00:14 -0400
committerbobzel <zzzman@gmail.com>2022-04-12 11:00:14 -0400
commit9fe8d2f771d5029b7c4c9fbd9c6dd316c88f02cd (patch)
tree28daefdebc03b99eab8371704f89c45692cd157b /src/Utils.ts
parentfd58a5f8598815ab1ab3893e60973654a59a52c1 (diff)
parent4b6e16e29b50b492b0a8cbdf32414c7a626f68bd (diff)
Merge branch 'master' into layoutIcons
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();