Skip to content

Colors

Current color variables from globals.css — light/dark aware via CSS variables. All swatches use var(--*) directly, so theme toggling updates them live. Future semantic tokens will alias these primitives.

Introduction#

DavinciUI’s color system is built on CSS variables. Light values live in :root, dark overrides in .dark. No new tokens are introduced here — this page documents the implementation as it exists today.

Color System Overview#

How it works

Primitive values (oklch, alpha mixes) → CSS variables → Tailwind utilities. Example: bg-[var(--primary)] or text-[var(--muted-foreground)]. Theme switching is automatic via the .dark class.

Background#

Surface layers — page, cards, popovers.

Background

--background

Page

Card

--card

Card

Popover

--popover

Popover

Sidebar

--sidebar

Sidebar

Foreground#

Text and icon colors paired with backgrounds.

Foreground

--foreground

On background

Card Foreground

--card-foreground

On card

Popover Foreground

--popover-foreground

On popover

Sidebar Foreground

--sidebar-foreground

On sidebar

Muted Foreground

--muted-foreground

Secondary text

Primary#

Primary actions — buttons, active states.

Primary

--primary

Solid button

Primary Foreground

--primary-foreground

On primary

Sidebar Primary

--sidebar-primary

Sidebar primary

Sidebar Primary Foreground

--sidebar-primary-foreground

On sidebar primary

Secondary#

Secondary surfaces — subtle fills.

Secondary

--secondary

Secondary bg

Secondary Foreground

--secondary-foreground

On secondary

Muted#

Muted and accent surfaces for subtle UI.

Muted

--muted

Muted bg

Accent

--accent

Accent bg

Accent Foreground

--accent-foreground

On accent

Sidebar Accent

--sidebar-accent

Sidebar accent

Destructive & Status#

Feedback and status — avoid inventing new hues here.

Destructive

--destructive

Error

Destructive Foreground

--destructive-foreground

On destructive

Info

--info

Info

Success

--success

Success

Warning

--warning

Warning

Border / Input / Ring#

Strokes and focus — alpha-based for light/dark.

Border

--border

Card border

Line

--line

Divider

Input

--input

Input border

Ring

--ring

Focus ring

Sidebar Border

--sidebar-border

Sidebar divider

Sidebar Ring

--sidebar-ring

Sidebar focus

Chart#

Data visualization palette.

Chart 1

--chart-1

Series 1

Chart 2

--chart-2

Series 2

Chart 3

--chart-3

Series 3

Chart 4

--chart-4

Series 4

Chart 5

--chart-5

Series 5

Dark Mode#

Same variables, different values in .dark. Toggle theme (top-right) to see live update. Example below forces dark for comparison:

Light

Dark (forced .dark)

Use existing theme provider — do not create a new theme system here.

Usage#

background: var(--background);
color: var(--foreground);
border-color: var(--border);
/* Focus */ box-shadow: 0 0 0 2px var(--ring);