DocsBlogDocsBlog
Log in

Customize global styles, brand colors, and design tokens

Styles & Theme

All visual styles are controlled by CSS variables in src/app/global.css, using the HSL color format. You can change the entire look of the site by modifying a few variables.

Changing the Brand Color

The primary brand color is defined by --brand and --primary. Modify both light and dark mode:

src/app/global.css
/* Light mode */
:root {
  --brand: 221 100% 60%;       /* Current: Blue */
  --brand-hover: 221 100% 57%;
  --primary: 221 100% 60%;
  --primary-foreground: 0 0% 100%;
}

/* Dark mode */
.dark {
  --brand: 221 100% 65%;
  --brand-hover: 221 100% 68%;
  --primary: 221 100% 65%;
}

Example: Change to green

:root {
  --brand: 142 76% 36%;
  --brand-hover: 142 76% 32%;
  --primary: 142 76% 36%;
}

.dark {
  --brand: 142 76% 46%;
  --brand-hover: 142 76% 50%;
  --primary: 142 76% 46%;
}

Core Color Variables

VariablePurposeLight Default
--backgroundPage background210 20% 98%
--foregroundMain text color215 25% 12%
--cardCard background0 0% 100%
--borderBorder color210 14% 93%
--accentAccent background221 100% 97%
--accent-foregroundAccent text221 80% 40%
--mutedMuted background210 18% 96.5%
--muted-foregroundSecondary text215 16% 48%
--brandBrand/primary color221 100% 60%
--brand-hoverBrand hover state221 100% 57%
--primaryPrimary UI color221 100% 60%
--primary-foregroundText on primary0 0% 100%

Dark Mode

Override any variable under the .dark selector in global.css. The theme toggle is handled automatically via fumadocs-theme (stored in localStorage).

Shadow Tokens

:root {
  --shadow-sm: 0 1px 2px rgba(16, 30, 54, 0.06);
  --shadow-md: 0 2px 6px rgba(16, 30, 54, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 30, 54, 0.12);
}

Changing Fonts

The default font is Plus Jakarta Sans. To change it, edit src/app/layout.tsx:

src/app/layout.tsx
import { Inter } from "next/font/google"; // Change import

const font = Inter({
  subsets: ["latin"],
  variable: "--font-sans",
  display: "optional",
});

Tailwind CSS Usage

Colors are mapped to Tailwind classes via @theme in global.css:

@theme {
  --color-brand: hsl(var(--brand));
  --color-primary: hsl(var(--primary));
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
}

Use in components: bg-brand, text-primary, bg-background, border-border, etc.