feat: update color handling for dark mode compatibility

- Updated various components to utilize `getAdaptiveLabelColor` for dynamic label color adjustments based on the current theme.
- Enhanced dark mode styles in `globals.css` for better visual consistency across components.

Made-with: Cursor
This commit is contained in:
DDD1542
2026-03-10 21:16:01 +09:00
parent fa6f76bff1
commit 58e958829c
23 changed files with 85 additions and 37 deletions

View File

@@ -0,0 +1,18 @@
/**
* 다크모드 대응 색상 유틸리티
* 화면 디자이너에서 기본값으로 저장된 어두운 색상을 감지하여
* 다크모드에서 자동으로 CSS 변수(foreground)로 대체
*/
const DEFAULT_DARK_COLORS = new Set([
"#212121", "#000000", "#333333", "#333", "#000",
"black", "#111111", "#1a1a1a", "#64748b",
]);
export const isDefaultDarkLabelColor = (color?: string): boolean => {
if (!color) return true;
return DEFAULT_DARK_COLORS.has(color.toLowerCase().trim());
};
export const getAdaptiveLabelColor = (labelColor?: string): string =>
isDefaultDarkLabelColor(labelColor) ? "hsl(var(--foreground))" : labelColor!;