Design
Theme Factory
Create design themes and color systems for applications. Use when users need to build theme systems, color palettes, or design tokens.
Create design themes and color systems for applications. Use when users need to build theme systems, color palettes, or design tokens.
Create comprehensive design themes and color systems for applications.
Color Tokens:
const colors = {
// Base colors
primary: {
50: '#eff6ff',
100: '#dbeafe',
200: '#bfdbfe',
300: '#93c5fd',
400: '#60a5fa',
500: '#3b82f6',
600: '#2563eb',
700: '#1d4ed8',
800: '#1e40af',
900: '#1e3a8a',
},
// Semantic colors
background: '#ffffff',
foreground: '#000000',
muted: '#f5f5f5',
accent: '#3b82f6',
destructive: '#ef4444',
};
Spacing Tokens:
const spacing = {
0: '0px',
1: '4px',
2: '8px',
3: '12px',
4: '16px',
5: '20px',
6: '24px',
8: '32px',
10: '40px',
12: '48px',
16: '64px',
};
Typography Tokens:
const typography = {
fontFamily: {
sans: 'Inter, system-ui, sans-serif',
mono: 'JetBrains Mono, monospace',
},
fontSize: {
xs: '0.75rem',
sm: '0.875rem',
base: '1rem',
lg: '1.125rem',
xl: '1.25rem',
'2xl': '1.5rem',
'3xl': '1.875rem',
'4xl': '2.25rem',
},
};
Extract Brand Elements:
Color Extraction:
function extractPalette(brandColor) {
return {
primary: generateShades(brandColor),
complementary: getComplementary(brandColor),
analogous: getAnalogous(brandColor),
};
}
Light Theme:
const lightTheme = {
background: '#ffffff',
foreground: '#000000',
card: '#ffffff',
muted: '#f5f5f5',
accent: colors.primary[500],
border: '#e5e5e5',
};
Dark Theme:
const darkTheme = {
background: '#0a0a0a',
foreground: '#fafafa',
card: '#1a1a1a',
muted: '#262626',
accent: colors.primary[400],
border: '#262626',
};
Button Variants:
const buttonThemes = {
primary: {
bg: colors.primary[500],
text: '#ffffff',
hover: colors.primary[600],
},
secondary: {
bg: colors.muted,
text: colors.foreground,
hover: colors.muted,
},
destructive: {
bg: colors.destructive,
text: '#ffffff',
hover: colors.destructive,
},
};
:root {
--background: 0 0% 100%;
--foreground: 0 0% 0%;
--primary: 221 83% 53%;
--primary-foreground: 0 0% 100%;
--muted: 0 0% 96%;
--border: 0 0% 90%;
}
[data-theme="dark"] {
--background: 0 0% 4%;
--foreground: 0 0% 98%;
--primary: 217 91% 60%;
--primary-foreground: 0 0% 100%;
--muted: 0 0% 15%;
--border: 0 0% 15%;
}