Color Utilities

Text, background, and border color utilities using semantic and grayscale colors.

Theme-Aware: Semantic colors (primary, success, etc.) automatically adapt to your selected theme.

Semantic Colors

Use semantic colors for consistent meaning across your application.

Primary

Main brand color

text-primary
bg-primary
border-primary

Secondary

Secondary actions

text-secondary
bg-secondary
border-secondary

Success

Positive outcomes

text-success
bg-success
border-success

Danger

Errors and warnings

text-danger
bg-danger
border-danger

Warning

Caution states

text-warning
bg-warning
border-warning

Gray Scale

A complete grayscale palette from light to dark.

Gray 50
#f9fafb
Gray 100
#f3f4f6
Gray 200
#e5e7eb
Gray 300
#d1d5db
Gray 400
#9ca3af
Gray 500
#6b7280
Gray 600
#4b5563
Gray 700
#374151
Gray 800
#1f2937
Gray 900
#111827

Text Colors

Use text-* utilities to set text color.

Text Colors

Primary text color

Secondary text color

Success text color

Danger text color

Warning text color

Muted text color

Background Colors

Use bg-* utilities to set background color.

Background Colors

bg-primary
bg-secondary
bg-success
bg-danger
bg-warning

Gray Backgrounds

Gray Background Utilities

bg-gray-50
bg-gray-100
bg-gray-200
bg-gray-800
bg-gray-900

Border Colors

Use border-* utilities to set border color.

Border Colors

border-primary
border-success
border-danger
border-warning

Common Patterns

Status Indicators

Colored Status Cards

Active

System is running normally

Warning

High CPU usage detected

Error

Connection failed

Colored Sections

Background Sections

Primary Section

Important content with primary background.

Gray Section

Secondary content with subtle background.

Accessibility

Best Practices:
  • Ensure sufficient color contrast (WCAG AA: 4.5:1 for text)
  • Don't rely solely on color to convey meaning
  • Use semantic colors consistently
  • Test colors in both light and dark themes
  • Combine color with icons or text for clarity