Documentation Index
Fetch the complete documentation index at: https://copylabs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Colors
Radix Themes Native provides a comprehensive color system with carefully designed color scales for both light and dark modes.Color Scale Structure
Each color has a 12-step scale designed for different purposes:| Step | Purpose |
|---|---|
| 1 | App background |
| 2 | Subtle background |
| 3 | UI element background |
| 4 | Hovered UI element background |
| 5 | Active / Selected UI element background |
| 6 | Subtle borders |
| 7 | UI element border, focus ring |
| 8 | Hovered UI element border |
| 9 | Solid backgrounds |
| 10 | Hovered solid backgrounds |
| 11 | Low-contrast text |
| 12 | High-contrast text |
Using Colors
In Components
Most components accept acolor prop:
In Custom Styles
Access colors through the theme object:Available Colors
Accent Colors
amber - Warm yellow-orange
black - Pure black
blue - Classic blue
bronze - Metallic brown
brown - Earth brown
crimson - Deep red
cyan - Light blue-green
gold - Rich golden
grass - Natural green
green - Standard green
indigo - Purple-blue
iris - Light purple
jade - Cool green
lime - Bright green
mint - Soft green
orange - Vibrant orange
pink - Light red
plum - Deep purple
purple - Standard purple
red - Standard red
ruby - Jewel red
sky - Light blue
teal - Blue-green
tomato - Red-orange
violet - Blue-purple
white - Pure white
yellow - Bright yellow
Gray Scales
| Scale | Description | Best For |
|---|---|---|
gray | Standard neutral gray | General purpose |
mauve | Warm gray with purple tint | Warm color schemes |
olive | Green-tinted gray | Natural/organic themes |
sage | Soft green-tinted gray | Calm, natural themes |
sand | Warm beige-tinted gray | Warm, earthy themes |
slate | Cool blue-tinted gray | Cool, modern themes |
Alpha Colors
For transparent overlays, use the alpha color scales:Alpha Scale Values
| Step | Opacity |
|---|---|
| 1 | 4% |
| 2 | 6% |
| 3 | 8% |
| 4 | 12% |
| 5 | 16% |
| 6 | 24% |
| 7 | 36% |
| 8 | 48% |
| 9 | 64% |
| 10 | 80% |
| 11 | 92% |
| 12 | 100% |
High Contrast Mode
Many components support ahighContrast prop for improved visibility:
- Background: Color step 11 (instead of 9)
- Text: Black/white (depending on mode)
Color Helper Functions
getVariantColors
Get colors for a specific variant:getColorScale
Get the full color scale:needsDarkText
Check if a color needs dark text (for light backgrounds):getForegroundColor
Get the appropriate text color for a given background:Best Practices
- Use appropriate colors - Use green for success states, red for errors, amber for warnings
- Maintain contrast - Ensure text has sufficient contrast against backgrounds
- Use highContrast - Enable for accessibility when needed
- Test both modes - Always test your UI in both light and dark modes