用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kwkraus/my-dashboard --skill add-theme-colors命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | add-theme-colors |
| description | Add or customize theme colors in the CSS custom properties system |
When adding or customizing theme colors in this Next.js dashboard:
Locate the theme definitions in src/app/globals.css:
:root selector.dark selectorColor format: Use HSL values without the hsl() wrapper:
--color-name: 220 10% 50%;
This allows using hsl(var(--color-name)) in components.
Available color categories:
Adding a new theme color:
:root {
--new-color: 210 100% 50%; /* Light mode */
}
.dark {
--new-color: 210 50% 40%; /* Dark mode */
}
Using the color in components:
// In Tailwind classes (if configured)
className="text-new-color"
// In inline styles or charts
color: "hsl(var(--new-color))"
backgroundColor: "hsl(var(--new-color))"
Chart colors (predefined: chart-1 through chart-5):
useChartColors hookBest practices:
Color palette consistency:
/* In src/app/globals.css */
:root {
--success: 142 76% 36%; /* Green for light mode */
--success-foreground: 0 0% 100%;
}
.dark {
--success: 142 69% 58%; /* Lighter green for dark mode */
--success-foreground: 0 0% 0%;
}
/* Usage in component */
<div className="bg-success text-success-foreground">
Success message
</div>
/* In src/app/globals.css */
:root {
--chart-6: 280 80% 60%; /* Purple for light mode */
}
.dark {
--chart-6: 280 70% 50%; /* Adjusted purple for dark mode */
}
/* The useChartColors hook can be extended to use it */
const colors = {
...useChartColors(),
chart6: "hsl(var(--chart-6))"
};
src/app/globals.csssrc/components/DashboardCharts.tsxadd-chartadd-shadcn-component