# Theme Family System / 主题家族系统 ## 概述 两层主题系统:`mode`(light/dark/system,由 next-themes 管理)+ `theme family`(色板,由自定义 context + CSS 变量管理)。 ## 架构 ``` themes/*.json → 定义色板(OKLCH)、代码主题映射 src/lib/theme/loader.ts → 服务端读取 + 校验 JSON,按 order 排序 src/lib/theme/render-css.ts → 生成 html[data-theme-family="x"] 规则 src/app/layout.tsx → 注入反闪烁脚本 +