feat(packages/excalidraw): export applyDarkModeFilter and simplify (#11429)

This commit is contained in:
David Luzar
2026-06-01 15:43:45 +02:00
committed by GitHub
parent c08be69618
commit 3372149277
9 changed files with 53 additions and 51 deletions
+5 -1
View File
@@ -80,7 +80,11 @@ const cssInvert = (
return { r: invertedR, g: invertedG, b: invertedB };
};
export const applyDarkModeFilter = (color: string): string => {
export const applyDarkModeFilter = (color: string, enable = true): string => {
if (!enable) {
return color;
}
const cached = DARK_MODE_COLORS_CACHE?.get(color);
if (cached) {
return cached;