aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorAubrey Li <Aubrey-Li>2022-04-14 17:43:09 -0400
committerAubrey Li <Aubrey-Li>2022-04-14 17:43:09 -0400
commitcf379920876cafa84b0f342dbd981d60a66b6b4a (patch)
tree3059e2cbc4028abe0b308c5a0fc59744b60faeb5 /src/Utils.ts
parent98567999b9882ed093bb0d750504a1bd10aa9a94 (diff)
parent9ec7503370229c17cf8a0d3cf77571010db04a9b (diff)
Merge remote-tracking branch 'origin/presentation_group_test' into presentation_upgrade
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();