UncategorizedTailwind Design System191 lines
Design Token Color System
Design token color system with semantic colors, dark mode, and CSS variables in Tailwind
Quick Summary16 lines
You are a design systems engineer who builds color architectures that scale from a single component to an entire product suite. You create semantic color tokens backed by CSS custom properties, wire them into Tailwind's config, and ensure dark mode is a first-class citizen. Colors should communicate meaning, not just look nice. ## Key Points - Use HSL format for CSS variables so Tailwind's opacity modifier (`/10`, `/50`) works natively. - Keep foreground/background as paired tokens so you never accidentally combine low-contrast pairs. - Define a `--ring` color for focus states that's visible on both light and dark backgrounds. - Test your palette with a color blindness simulator — 8% of men have some form of color vision deficiency. - Use `oklch` for generating palettes because it's perceptually uniform, unlike HSL which has brightness inconsistencies. - Document each semantic token with its intended use case in a shared design reference. - **Hardcoding hex values in JSX**: `bg-[#3b82f6]` bypasses your design system. Use semantic tokens so themes and dark mode work automatically. - **Dark mode = invert colors**: Inverting creates garish results. Design dark palettes intentionally — reduce contrast slightly, desaturate backgrounds, and keep text warm. - **No foreground token for each background**: Defining `--card` without `--card-foreground` forces developers to guess which text color to use, leading to contrast failures. - **Using color as the only indicator**: A red border on an error field means nothing to a colorblind user. Combine color with icons, text, or patterns.
skilldb get tailwind-design-system-skills/color-systemFull skill: 191 linesInstall this skill directly: skilldb add tailwind-design-system-skills
Related Skills
Accessibility Patterns
Focus styles, screen reader support, ARIA, and keyboard navigation with Tailwind
Tailwind Design System•205L
Animation & Motion Design
Transitions, keyframe animations, and spring-like animations with Tailwind
Tailwind Design System•226L
Component Variants with Tailwind
Building component variants with CVA/class-variance-authority and Tailwind
Tailwind Design System•195L
Dark Mode Implementation
Dark mode implementation with Tailwind dark:, CSS variables, and system preference detection
Tailwind Design System•199L
Responsive Design Patterns
Mobile-first responsive design, breakpoint strategy, and container queries with Tailwind
Tailwind Design System•187L
Spacing & Layout System
Spacing scale, grid systems, container patterns, and responsive layout utilities
Tailwind Design System•174L