css-colors
Instructions on how to add new colors for CSS rules
When & Why to Use This Skill
This Claude skill provides a standardized framework for managing CSS colors within frontend projects, specifically optimized for Material UI (MUI) environments. It streamlines the process of adding new colors while enforcing design consistency and code maintainability by prioritizing theme-based variables over hardcoded values.
Use Cases
- Case 1: Standardizing UI development by ensuring all new CSS rules adhere to the Material UI color palette and project-specific theme configurations.
- Case 2: Preventing technical debt by guiding developers to update the central theme file's customColors section instead of using direct hex or RGB codes in component logic.
- Case 3: Streamlining the onboarding process for new frontend developers by providing clear, automated instructions on the project's styling conventions and theme architecture.
| name | css-colors |
|---|---|
| description | Instructions on how to add new colors for CSS rules |
When adding new colors for CSS rules, follow these guidelines to ensure consistency and maintainability:
- If possible use Material UI color palette which is derived from MUI theme in frontend/src/theme/theme.ts
- Do not use direct color codes in component code but instead refer to the theme colors
- If a new color is needed, add it to the theme file's customColors section