Colors
Accessible color system with 12-step scales, automatic dark mode, and P3 gamut support. All credit for the color system goes to Radix Colors. Kookie UI uses Radix Colors with minimal to no modifications.
The colors, scales, and design decisions are entirely from the Radix Colors project. For complete color palette, usage guidelines, and design rationale, visit the Radix Colors documentation.
Installation
shellUsage
Colors are controlled through the Theme component's accentColor and grayColor props. All components automatically inherit these theme colors, but individual components can override with their own color prop.
tsxThe grayColor prop also accepts 'auto', which automatically matches a neutral gray to the chosen accent color for a cohesive look.
tsxAccent Colors
Set accentColor to choose from 25+ colors for primary interactive elements like buttons, links, and focus indicators.
Available accent colors: gray, gold, bronze, brown, yellow, amber, orange, tomato, red, ruby, crimson, pink, plum, purple, violet, iris, indigo, blue, cyan, teal, jade, green, grass, lime, mint, sky.
tsxtsxtsxGray Colors
Set grayColor to select from 6 tinted gray options for text and backgrounds. Each gray has a subtle tint that pairs well with different accent colors.
Available gray colors: auto, gray, mauve, slate, sage, olive, sand.
auto- Automatically matches a neutral gray to your accent colorgray- Pure neutral graymauve- Slightly purple-tinted grayslate- Slightly blue-tinted gray (default)sage- Slightly green-tinted grayolive- Slightly yellow-tinted graysand- Slightly warm-tinted gray
tsxtsxtsxComponent Overrides
Individual components can override theme colors using their color prop. This is useful for creating visual hierarchy or emphasizing specific actions.
tsxtsxColor Scales
Each color uses a 12-step scale from lightest to darkest, designed by Radix Colors. Steps 1-3 are for subtle backgrounds, steps 4-6 for borders and dividers, steps 7-9 for interactive states, and steps 10-12 for high-contrast text and important elements.
Access color steps using CSS custom properties:
cssDark Mode
All colors automatically adapt to dark mode when using the Theme component's appearance prop. Colors are carefully tuned to maintain proper contrast ratios in both light and dark themes.
tsxtsxP3 Gamut Support
Radix Colors support the P3 color gamut for displays that can show a wider range of colors. Colors automatically use P3 values when available, falling back to sRGB for compatibility.
Accessibility
All color combinations meet WCAG AA contrast requirements, as designed by Radix Colors. Use highContrast prop on components for maximum visibility, especially on complex or translucent backgrounds.
tsxCredits
The entire color system is from Radix Colors by WorkOS. Kookie UI makes no significant changes to the color values, scales, or design decisions. All credit and design work belongs to the Radix Colors project.