diff options
Diffstat (limited to 'src/Utils.ts')
-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 77095005b..d1d400de7 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -604,6 +604,7 @@ export function DashColor(color: string) { export function lightOrDark(color: any) { if (color === "transparent") return "gray"; + if (color.startsWith?.("linear")) return "black"; const nonAlphaColor = color.startsWith("#") ? (color as string).substring(0, 7) : color.startsWith("rgba") ? color.replace(/,.[^,]*\)/, ")").replace("rgba", "rgb") : color; const col = DashColor(nonAlphaColor).rgb(); |