Files
CodePilot/themes/everforest.json
T
7418andClaude Opus 4.6 4da188bfe5 feat: theme family system with 12 color palettes + NavRail redesign
Theme system:
- Two-layer architecture: mode (light/dark/system via next-themes) + theme family (color palette via CSS variables)
- 12 theme families: Default, GitHub, Rosé Pine, Tokyo Night, Everforest, Nord, Kanagawa, Night Owl, Poimandres, Vesper, Horizon, SynthWave '84
- Per-family code block highlighting for Prism, HLJS, and Shiki (no more generic oneLight/oneDark fallback)
- Anti-FOUC: synchronous script in <head> reads localStorage and sets data-theme-family before paint
- Theme JSON files in themes/ directory, auto-discovered by server-side loader
- OKLCH color space for all values; CSS specificity html[data-theme-family] beats :root

UI changes:
- NavRail: moved Settings to bottom (replacing theme toggle), removed light/dark toggle button
- Settings: merged General controls into one card with dividers; Appearance section with live Shiki code preview
- Replaced hardcoded blue-500/blue-600 with primary/primary-foreground across 19 components
- Appearance settings: pill mode selector (light/dark/system), theme family dropdown, live code preview

New files:
- src/lib/theme/{types,loader,render-css,context,code-themes}.ts — core theme infrastructure
- src/components/layout/ThemeFamilyProvider.tsx — client context provider
- src/components/settings/AppearanceSection.tsx — appearance settings UI
- src/hooks/useAppTheme.ts — combined theme hook
- themes/*.json — 12 theme family definitions
- docs/handover/theme-system.md — handover documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 11:15:01 +08:00

81 lines
3.1 KiB
JSON

{
"id": "everforest",
"label": "Everforest",
"order": 4,
"description": "Comfortable green-toned palette inspired by natural landscapes",
"codeTheme": {
"light": "gruvboxLight",
"dark": "duotoneForest"
},
"shikiTheme": {
"light": "everforest-light",
"dark": "everforest-dark"
},
"light": {
"background": "oklch(0.974 0.026 90.1)",
"foreground": "oklch(0.515 0.021 232.9)",
"card": "oklch(0.952 0.031 98.9)",
"cardForeground": "oklch(0.515 0.021 232.9)",
"popover": "oklch(0.952 0.031 98.9)",
"popoverForeground": "oklch(0.515 0.021 232.9)",
"primary": "oklch(0.720 0.122 125.2)",
"primaryForeground": "oklch(0.974 0.026 90.1)",
"secondary": "oklch(0.937 0.031 98.9)",
"secondaryForeground": "oklch(0.515 0.021 232.9)",
"muted": "oklch(0.937 0.031 98.9)",
"mutedForeground": "oklch(0.689 0.024 141.2)",
"accent": "oklch(0.937 0.031 98.9)",
"accentForeground": "oklch(0.515 0.021 232.9)",
"destructive": "oklch(0.671 0.200 25.2)",
"border": "oklch(0.892 0.028 98.1)",
"input": "oklch(0.892 0.028 98.1)",
"ring": "oklch(0.720 0.122 125.2)",
"chart1": "oklch(0.720 0.122 125.2)",
"chart2": "oklch(0.600 0.090 220.0)",
"chart3": "oklch(0.680 0.140 60.0)",
"chart4": "oklch(0.620 0.120 310.0)",
"chart5": "oklch(0.550 0.100 180.0)",
"sidebar": "oklch(0.974 0.026 90.1)",
"sidebarForeground": "oklch(0.515 0.021 232.9)",
"sidebarPrimary": "oklch(0.720 0.122 125.2)",
"sidebarPrimaryForeground": "oklch(0.974 0.026 90.1)",
"sidebarAccent": "oklch(0.937 0.031 98.9)",
"sidebarAccentForeground": "oklch(0.515 0.021 232.9)",
"sidebarBorder": "oklch(0.892 0.028 98.1)",
"sidebarRing": "oklch(0.720 0.122 125.2)"
},
"dark": {
"background": "oklch(0.324 0.015 240.4)",
"foreground": "oklch(0.830 0.041 86.1)",
"card": "oklch(0.360 0.017 227.1)",
"cardForeground": "oklch(0.830 0.041 86.1)",
"popover": "oklch(0.360 0.017 227.1)",
"popoverForeground": "oklch(0.830 0.041 86.1)",
"primary": "oklch(0.773 0.091 125.8)",
"primaryForeground": "oklch(0.324 0.015 240.4)",
"secondary": "oklch(0.394 0.017 227.0)",
"secondaryForeground": "oklch(0.830 0.041 86.1)",
"muted": "oklch(0.394 0.017 227.0)",
"mutedForeground": "oklch(0.647 0.020 155.6)",
"accent": "oklch(0.394 0.017 227.0)",
"accentForeground": "oklch(0.830 0.041 86.1)",
"destructive": "oklch(0.709 0.128 19.6)",
"border": "oklch(0.455 0.015 236.9)",
"input": "oklch(0.394 0.017 227.0)",
"ring": "oklch(0.773 0.091 125.8)",
"chart1": "oklch(0.773 0.091 125.8)",
"chart2": "oklch(0.650 0.090 220.0)",
"chart3": "oklch(0.750 0.130 60.0)",
"chart4": "oklch(0.680 0.120 310.0)",
"chart5": "oklch(0.600 0.100 180.0)",
"sidebar": "oklch(0.324 0.015 240.4)",
"sidebarForeground": "oklch(0.830 0.041 86.1)",
"sidebarPrimary": "oklch(0.773 0.091 125.8)",
"sidebarPrimaryForeground": "oklch(0.324 0.015 240.4)",
"sidebarAccent": "oklch(0.394 0.017 227.0)",
"sidebarAccentForeground": "oklch(0.830 0.041 86.1)",
"sidebarBorder": "oklch(0.268 0.011 237.1)",
"sidebarRing": "oklch(0.773 0.091 125.8)"
}
}