CentercodeDitto
DittoPorygonAPI

Color System

Semantic tokens and brand palette for consistent theming

Overview

The color system provides semantic tokens that automatically adapt to dark and light modes. Always use semantic token class names - never hardcode hex values.

Key Principles

  • Semantic tokens adapt automatically to dark/light modes
  • Always pair surface tokens with their foreground counterparts
  • Use status colors for their intended purpose (success, warning, error, info)
  • Brand gradient reserved for 1-2 featured elements per page

Semantic Tokens

Semantic tokens map to CSS variables that change based on theme. Use these Tailwind classes instead of hex colors.

Surface Tokens

Background colors for page areas, containers, and inputs

background
bg-background
foreground
text-foreground
card
bg-card
card-foreground
text-card-foreground
popover
bg-popover
popover-foreground
text-popover-foreground
muted
bg-muted
muted-foreground
text-muted-foreground
elevated
bg-elevated
elevated-foreground
text-elevated-foreground
sidebar
bg-sidebar
topbar
bg-topbar
field
bg-field

Action Tokens

Colors for interactive elements and buttons

primary
bg-primary
primary-foreground
text-primary-foreground
primary-hover
hover:bg-primary-hover
secondary
bg-secondary
secondary-foreground
text-secondary-foreground
secondary-hover
hover:bg-secondary-hover

Status Tokens

Semantic colors for feedback and state indicators

destructive
bg-destructive
destructive-foreground
text-destructive-foreground
destructive-hover
hover:bg-destructive-hover
success
bg-success
success-foreground
text-success-foreground
success-hover
hover:bg-success-hover
warning
bg-warning
warning-foreground
text-warning-foreground
warning-hover
hover:bg-warning-hover
info
bg-info
info-foreground
text-info-foreground
info-hover
hover:bg-info-hover

Form Tokens

Colors for form elements and focus states

border
border-border
input
border-input
ring
ring-ring
placeholder
placeholder:text-placeholder

Interactive Tokens

States for interactive elements

hover
hover:bg-hover
selected
bg-selected
accent
bg-accent
accent-foreground
text-accent-foreground
disabled
bg-disabled
disabled-foreground
text-disabled-foreground

Link Tokens

Colors for text links

link
text-link
link-hover
hover:text-link-hover
link-visited
text-link-visited

Utility Tokens

Additional layout and utility colors

overlay
bg-overlay/50
divider
border-divider
scrollbar-active
scrollbar-thumb-active

Chart Colors

Data visualization colors optimized for each theme mode

chart-1
fill-chart-1
chart-2
fill-chart-2
chart-3
fill-chart-3
chart-4
fill-chart-4
chart-5
fill-chart-5
chart-6
fill-chart-6

User Role Colors

Standardized colors for user role badges and indicators

These colors are defined in @/ui/config/roles.ts and are the single source of truth for role visual styling. Use these for badges, indicators, and any role-related UI.

SUPER_ADMIN#cd4747

faUserSecret

Super Admin
OWNER#4867a1

faUserShield

Owner
BUILDER#7759a1

faUserCog

Builder
PARTICIPANT#64697a

faUserCheck

Participant
PUBLIC#888f9f

faGlobe

Public

Import: import { ROLE_VISUAL_CONFIG } from '@/ui/config/roles'

Brand Palette

The full brand color palette with 11 shades per hue (50-950). Use semantic tokens when possible; use palette colors for custom decorative elements.

Orange is the primary brand color. The gradient uses Pink, Teal, and Purple.

Gray

Red

Orange(Primary Brand)

Yellow

Green

Teal

Blue

Purple

Pink

Brand Gradient & Effects

The signature Centercode gradient and shadow system

Signature Gradient

The brand gradient (pink → teal → purple) creates visual emphasis. Limit to 1-2 featured elements per page.

pink-400
teal-300
purple-700

Gradient Card Border

Gradient Rule

Apply .rule-gradient class for a 2px horizontal gradient line.

Shadow System

Shadows provide elevation hierarchy. Use shadow-xs through shadow-lg.

Usage Guidelines

Always Use

  • Semantic token classes (bg-primary, text-muted-foreground)
  • Surface + foreground pairs for proper contrast
  • Status colors for their intended meaning

Never Use

  • Hardcoded hex values in components
  • Arbitrary Tailwind values (bg-[#hex])
  • Status colors for decorative purposes