Skip to main content

Colors

The color system uses semantic naming to ensure consistent styling across your app.

Color Categories

Primary Colors

TokenUsage
primaryPrimary buttons, active states
primaryVariantHover/pressed states, active tab indicators
onPrimaryText/icons on primary backgrounds

Secondary Colors

TokenUsage
secondaryMultinaire Branding, ighlights, links
secondaryVariantHover/pressed states
onSecondaryText/icons on secondary backgrounds

Background Colors

TokenUsage
backgroundScreen backgrounds, containers
backgroundVariantCard backgrounds, input backgrounds, surface buttons, tab bars
onBackgroundPrimary text color, headings, body text

Neutral Colors

TokenUsage
neutralSecondary text, icons, disabled states
neutralVariantPlaceholder text, hint text, subtle borders, dividers
onNeutralText on neutral backgrounds

Base Colors

TokenUsage
basePage containers, base white/black
baseVariantModal backdrop, dropdown overlays, scrims
onBaseText on base surfaces

Semantic Colors

TokenUsage
successSuccess messages, checkmarks, positive states
warningWarning messages, caution indicators
errorError messages, validation errors, destructive actions

Usage in Components

With Multinaire Components

Most components accept a color prop using the semantic token name:

<MultinaireContainer backgroundColor="backgroundVariant">
{/* Content */}
</MultinaireContainer>

<MultinaireText color="primary">Primary text</MultinaireText>

<MultinaireIcon icon="Check" color="success" />

Direct Access

const { colors } = useMultinaireTheme();

<View style={{ backgroundColor: colors.primary }}>
<Text style={{ color: colors.onPrimary }}>Hello</Text>
</View>

Light vs Dark Mode

Each color has different values for light and dark modes:

{
"colors": {
"light": {
"background": "#FBFBFB",
"onBackground": "#121212"
},
"dark": {
"background": "#121212",
"onBackground": "#E0E0E0"
}
}
}

The correct colors are automatically applied based on the current theme mode.

Color Formats

Supported color formats:

  • Hex: #RRGGBB or #RRGGBBAA
  • RGBA: rgba(255, 255, 255, 0.5)
{
"base": "#FFFFFF",
"baseVariant": "rgba(80, 80, 80, 0.5)"
}

Accessibility

When choosing colors, ensure:

  • Sufficient contrast between text and background (WCAG 2.1 AA minimum)
  • onPrimary has good contrast with primary
  • onBackground has good contrast with background
  • Error states are distinguishable without relying solely on color