Thrive Design System

Foundation

Colors

Our color system built using OKLCH color space for perceptually uniform colors and consistent accessibility

Overview

Our color system is built using OKLCH color space for perceptually uniform colors and consistent accessibility. The system includes comprehensive color palettes with semantic naming conventions.

Color System Overview

OKLCH Color Space

We use OKLCH (Oklch Lightness Chroma Hue) for all our color definitions because it provides:

  • Perceptual uniformity: Colors with the same lightness appear equally bright
  • Better accessibility: More predictable contrast ratios
  • Consistent saturation: Colors maintain consistent vibrancy across hues

OKLCH and Dark Mode Scaling

While OKLCH enables consistent perceptual scaling, we intentionally deviated from strict mathematical rules to ensure colors feel natural and visually harmonious. Dark mode colors are not simply inverted versions of light mode—they represent a fundamentally different approach to color presentation. We've applied distinct scaling strategies for dark mode that account for reduced ambient light, different contrast requirements, and the perceptual differences in how colors appear on dark backgrounds. This approach ensures our dark theme feels cohesive and natural, rather than mechanically inverted.

Color Palettes

Base Colors

Essential black and white colors for high contrast and foundational elements.

White
Black

Primary Colors

Our primary color palette uses teal/cyan tones for the brand identity across all shades from 50 to 950.

50
100
200
300
400
500
600
700
800
900
950

Gray Scale

Our neutral colors for backgrounds, borders, and subtle elements ranging from 50 to 950.

50
100
200
300
400
500
600
700
800
900
950

Red Palette

For errors, warnings, and destructive actions.

50
100
200
300
400
500
600
700
800
900

Orange Palette

Warm accent colors for highlights and notifications.

50
100
200
300
400
500
600
700
800
900

Yellow Palette

Warning states and attention-grabbing elements.

50
100
200
300
400
500
600
700
800
900

Green Palette

Success states, positive feedback, and nature themes.

50
100
200
300
400
500
600
700
800
900

Teal Palette

Cool accent colors and secondary brand elements.

50
100
200
300
400
500
600
700
800
900

Blue Palette

Information states, links, and professional themes.

50
100
200
300
400
500
600
700
800
900

Indigo Palette

Deep blue tones for sophisticated interfaces.

50
100
200
300
400
500
600
700
800
900

Purple Palette

Creative and premium brand elements.

50
100
200
300
400
500
600
700
800
900

Pink Palette

Playful accents and feminine brand elements.

50
100
200
300
400
500
600
700
800
900

Dark Mode Support

Automatic Dark Mode

All colors automatically adapt to dark mode using CSS custom properties. The dark mode theme inverts and adjusts colors for optimal readability in low-light conditions.

Key Dark Mode Changes

.dark {
  /* Backgrounds become dark */
  --color-panel: oklch(0.21 0.02 256);     /* Dark panels */
  --color-bg: var(--color-gray-50);        /* Very dark background */
  
  /* Text becomes light */
  --color-ink-dark: oklch(0.98 0 0);       /* White text */
  --color-ink: oklch(0.95 0 248);          /* Light text */
  --color-ink-light: oklch(0.71 0.02 259); /* Muted light text */
  --color-ink-muted: oklch(0.6 0.05 258);  /* Dark mode muted */
  
  /* Primary colors adjust for better contrast */
  --color-primary-solid: var(--color-primary-400);
  --color-primary-solid-hover: var(--color-primary-600);
  
  /* Semantic colors use lighter variants */
  --color-ink-destructive: var(--color-red-900);
  --color-ink-success: var(--color-green-900);
  --color-ink-warning: var(--color-yellow-900);
}

Testing Dark Mode

To test dark mode functionality:

  1. In your app: Add class="dark" to the <html> or <body> element
  2. URL parameter: Add ?theme=dark to test specific scenarios
  3. Media query: Use prefers-color-scheme: dark for automatic detection

Best Practices

Use semantic color tokens

Always use semantic color tokens (like --color-primary-solid) instead of raw color values for consistent theming across light and dark modes.

Test color combinations

Test all color combinations for accessibility compliance. Ensure proper contrast ratios for text and interactive elements.

Use OKLCH values

Use the OKLCH values provided in design tokens for consistent color perception across all hues.

Don't use hard-coded colors

Don't use hard-coded hex colors in components. Always reference design tokens for maintainability.

Don't create custom colors

Don't create custom colors outside the design system without consulting the design team.

Don't ignore contrast requirements

Don't use colors that don't meet WCAG 2.1 AA contrast requirements (4.5:1 for normal text, 3:1 for large text).

Accessibility

WCAG Compliance

All color combinations meet WCAG 2.1 AA standards for accessibility.

All color combinations meet WCAG 2.1 AA standards:

  • Normal text: 4.5:1 contrast ratio minimum
  • Large text: 3:1 contrast ratio minimum
  • Interactive elements: Clear focus indicators
  • Color-blind friendly: Not relying on color alone to convey meaning

Implementation

CSS Custom Properties

.my-component {
  background-color: var(--color-panel);
  color: var(--color-ink);
  border: 1px solid var(--color-border);
}

Tailwind Classes

<div class="bg-panel text-ink border border-border">
  Content with semantic colors
</div>

React Component

<Card className="bg-panel text-ink border-border">
  <Text color="text-ink-light">Secondary text</Text>
</Card>