StarForge

Colors

Star Forge design tokens and color system

Star Forge uses CSS custom properties (variables) for its design tokens. These variables are defined in src/app/global.css and mapped to Tailwind CSS utilities via the @theme inline directive.

Color System

The color system follows the shadcn/ui convention with semantic tokens for both light and dark modes. All components consume these variables, ensuring consistent theming across the entire library.

How it works

Each semantic token is defined as a CSS variable:

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  /* ... */
}

Tailwind maps these variables to utility classes:

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  /* ... */
}

This allows usage like bg-primary, text-muted-foreground, border-input, etc.

Preview

Theme Colors

Background

--background

Foreground

--foreground

Card

--card

Card Foreground

--card-foreground

Popover

--popover

Popover Foreground

--popover-foreground

Primary

--primary

Primary Foreground

--primary-foreground

Secondary

--secondary

Secondary Foreground

--secondary-foreground

Muted

--muted

Muted Foreground

--muted-foreground

Accent

--accent

Accent Foreground

--accent-foreground

Destructive

--destructive

Border

--border

Input

--input

Ring

--ring

Chart Colors

Chart 1

--chart-1

Chart 2

--chart-2

Chart 3

--chart-3

Chart 4

--chart-4

Chart 5

--chart-5

Sidebar Colors

Sidebar

--sidebar

Sidebar Foreground

--sidebar-foreground

Sidebar Primary

--sidebar-primary

Sidebar Primary Foreground

--sidebar-primary-foreground

Sidebar Accent

--sidebar-accent

Sidebar Accent Foreground

--sidebar-accent-foreground

Sidebar Border

--sidebar-border

Sidebar Ring

--sidebar-ring

How Colors are Defined

The palette is defined in src/app/global.css using CSS custom properties:

  • :root — Light mode values
  • .dark — Dark mode values

Tailwind CSS v4 maps these variables to utility classes via the @theme inline directive, so every component uses the same semantic tokens consistently.

Theme Reference

TokenPurpose
--backgroundPage background
--foregroundPrimary text color
--card / --card-foregroundCard surfaces and text
--popover / --popover-foregroundPopover/dropdown surfaces
--primary / --primary-foregroundPrimary action color (buttons, links)
--secondary / --secondary-foregroundSecondary action color
--muted / --muted-foregroundSubdued backgrounds and helper text
--accent / --accent-foregroundHighlight and focus states
--destructive / --destructive-foregroundError and danger states
--borderDefault border color
--inputForm input borders
--ringFocus ring outline
--chart-1--chart-5Data visualization palette
--sidebar-*Sidebar-specific tokens

On this page

Built with ❤️ using React, Next.js, TypeScript, and Tailwind CSS