Skip to main content

Color Props

Color props control text color, background color, and opacity. Values reference the theme's colors scale.

Available Props

PropCSS PropertyTheme Key
colorcolorcolors
bgbackground-colorcolors
opacityopacitynone
fillfillcolors
strokestrokecolors

Theme Scale

// Default colors scale in theme
{
colors: {
primary: '#0070f3',
secondary: '#6b46c1',
text: {
primary: '#16161D',
secondary: '#4A5568',
disabled: '#A0AEC0'
},
background: {
primary: '#FFFFFF',
secondary: '#F7FAFC'
},
// ... other color tokens
}
}

Usage

<Box 
color="text.primary"
bg="background.secondary"
opacity={0.8}
/>