diff options
author | Jenny Yu <jennyyu212@outlook.com> | 2022-04-28 16:09:53 -0400 |
---|---|---|
committer | Jenny Yu <jennyyu212@outlook.com> | 2022-04-28 16:09:53 -0400 |
commit | 9f62b6d1c9848439671065dac9ed79bc393c83fa (patch) | |
tree | 2f0ba7456816d6147764440ba78fcadab10a2f69 | |
parent | 0a84982e2ea59d737f394bc79fa7f26a4bf29a80 (diff) | |
parent | 4b6e16e29b50b492b0a8cbdf32414c7a626f68bd (diff) |
Merge branch 'master' into recording-jenny
-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(); |