Loading...
Loading...
Master color design with color theory, accessibility, theming, and dark mode. Create harmonious color systems that work across contexts, support accessibility standards, and enable flexible theming. Includes color psychology, contrast ratios, and color-blind friendly palettes.
npx skill4agent add sanky369/vibe-building-skills color-systemPrimary: #3B82F6
Tints (lighter): #93C5FD, #DBEAFE, #EFF6FF
Shades (darker): #1D4ED8, #1E40AF, #0C2340Primary: #3B82F6 (blue)
Secondary: #8B5CF6 (purple) - 60° away
Tertiary: #06B6D4 (cyan) - 60° awayPrimary: #3B82F6 (blue)
Complementary: #F59E0B (amber)Primary: #3B82F6 (blue)
Secondary: #F59E0B (amber)
Tertiary: #10B981 (green)module.exports = {
theme: {
colors: {
// Primary color with full spectrum
primary: {
50: '#EFF6FF',
100: '#DBEAFE',
200: '#BFDBFE',
300: '#93C5FD',
400: '#60A5FA',
500: '#3B82F6', // Base
600: '#2563EB',
700: '#1D4ED8',
800: '#1E40AF',
900: '#1E3A8A',
950: '#0C2340',
},
// Secondary color
secondary: {
50: '#F3E8FF',
500: '#8B5CF6',
950: '#2E1065',
},
// Semantic colors
success: '#10B981',
warning: '#F59E0B',
error: '#EF4444',
info: '#06B6D4',
// Neutral colors (grayscale)
neutral: {
50: '#F9FAFB',
100: '#F3F4F6',
200: '#E5E7EB',
300: '#D1D5DB',
400: '#9CA3AF',
500: '#6B7280',
600: '#4B5563',
700: '#374151',
800: '#1F2937',
900: '#111827',
950: '#030712',
},
},
},
};module.exports = {
theme: {
colors: {
// Semantic colors (light mode)
'bg-primary': 'var(--color-bg-primary)', // {neutral.50}
'bg-secondary': 'var(--color-bg-secondary)', // {neutral.100}
'bg-tertiary': 'var(--color-bg-tertiary)', // {neutral.200}
'text-primary': 'var(--color-text-primary)', // {neutral.950}
'text-secondary': 'var(--color-text-secondary)', // {neutral.600}
'text-tertiary': 'var(--color-text-tertiary)', // {neutral.500}
'text-inverse': 'var(--color-text-inverse)', // {neutral.50}
'border-primary': 'var(--color-border-primary)', // {neutral.200}
'border-secondary': 'var(--color-border-secondary)', // {neutral.300}
'interactive-primary': 'var(--color-interactive-primary)', // {primary.500}
'interactive-hover': 'var(--color-interactive-hover)', // {primary.600}
'interactive-active': 'var(--color-interactive-active)', // {primary.700}
'interactive-disabled': 'var(--color-interactive-disabled)', // {neutral.300}
},
},
};module.exports = {
theme: {
colors: {
// Button colors
'button-primary-bg': 'var(--color-interactive-primary)',
'button-primary-text': 'var(--color-text-inverse)',
'button-secondary-bg': 'var(--color-bg-secondary)',
'button-secondary-text': 'var(--color-text-primary)',
// Card colors
'card-bg': 'var(--color-bg-primary)',
'card-border': 'var(--color-border-primary)',
// Input colors
'input-bg': 'var(--color-bg-primary)',
'input-border': 'var(--color-border-primary)',
'input-text': 'var(--color-text-primary)',
},
},
};| Level | Normal Text | Large Text | Graphics |
|---|---|---|---|
| AA | 4.5:1 | 3:1 | 3:1 |
| AAA | 7:1 | 4.5:1 | 3:1 |
// Using Polished library
import { readableColor } from 'polished';
const backgroundColor = '#3B82F6';
const textColor = readableColor(backgroundColor); // Returns #FFFFFF or #000000Primary: #0173B2 (blue, visible to all)
Secondary: #DE8F05 (orange, visible to all)
Accent: #CC78BC (purple, visible to most)
Neutral: #CA9161 (brown, visible to all)/* Light mode (default) */
:root {
--color-bg-primary: #F9FAFB;
--color-bg-secondary: #F3F4F6;
--color-text-primary: #030712;
--color-text-secondary: #4B5563;
--color-border-primary: #E5E7EB;
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
:root {
--color-bg-primary: #030712;
--color-bg-secondary: #111827;
--color-text-primary: #F9FAFB;
--color-text-secondary: #D1D5DB;
--color-border-primary: #374151;
}
}prefers-color-schemecolors: {
'status-success': '#10B981',
'status-warning': '#F59E0B',
'status-error': '#EF4444',
'status-info': '#06B6D4',
}colors: {
'interactive-default': '#3B82F6',
'interactive-hover': '#2563EB',
'interactive-active': '#1D4ED8',
'interactive-disabled': '#D1D5DB',
'interactive-focus': '#3B82F6', // with outline
}colors: {
'elevation-1': '#FFFFFF', // Highest
'elevation-2': '#F9FAFB',
'elevation-3': '#F3F4F6',
'elevation-4': '#E5E7EB', // Lowest
}"I'm using the color-system skill. Can you create a color system for me?
- Primary color: #3B82F6 (blue)
- Brand personality: Modern, professional, trustworthy
- Include: primary, secondary, semantic, and component colors
- Ensure WCAG AA contrast compliance
- Support both light and dark modes
- Provide Tailwind config""Can you audit my current color system?
- Are my colors harmonious?
- Do all text/background combinations meet WCAG AA?
- Are my colors used consistently?
- Is my dark mode accessible?
- Are my colors color-blind friendly?
- What improvements would you suggest?""Can you create a color-blind friendly palette?
- Primary color: blue
- Secondary color: orange
- Accent color: purple
- Ensure all combinations are visible to color-blind users
- Provide contrast ratios for verification""Can you help me implement dark mode?
- Define semantic color tokens for light and dark modes
- Ensure contrast is sufficient in both modes
- Provide CSS variables and Tailwind config
- Test readability in both modes""Can you evaluate my color system?
- Are my colors harmonious?
- Do they support my brand personality?
- Are all contrast ratios sufficient?
- Is my dark mode accessible?
- Are my colors color-blind friendly?
- What's one thing I could improve immediately?"