Skip to content

Themes

Pearl uses a design token system built on CSS custom properties. Every visual property — color, typography, spacing, elevation — comes from a finite token scale, ensuring consistency across the UI.

Pearl supports both dark and light modes. The active mode is determined by your system preference (prefers-color-scheme), with dark mode as the default.

The theme applies automatically — no configuration needed.

Pearl’s visual identity is defined by a set of CSS custom properties in the :root scope. These tokens use the OKLCH color space for perceptually uniform colors.

TokenPurpose
--pearl-bgPage background
--pearl-fgPrimary text color
--pearl-primaryBrand accent (indigo)
--pearl-secondarySecondary surfaces
--pearl-mutedSubdued backgrounds
--pearl-accentHighlighted elements
--pearl-borderBorder color
--pearl-ringFocus ring color
--pearl-surfaceCard/panel backgrounds
TokenPurpose
--pearl-successPositive states (green)
--pearl-infoInformational states (blue)
--pearl-warningWarning states (yellow/orange)
--pearl-dangerError/destructive states (red)

Each semantic color has a corresponding -fg variant for text on that background (e.g., --pearl-success-fg).

Pearl uses two variable fonts:

  • Inter Variable — sans-serif, used for body text and headings
  • JetBrains Mono Variable — monospace, used for code and technical content

These are available through the --pearl-font-sans and --pearl-font-mono tokens.

Three shadow levels create depth hierarchy:

TokenUse case
--pearl-shadow-smSubtle lift (buttons, badges)
--pearl-shadow-mdCards and panels
--pearl-shadow-lgModals and popovers

Pearl’s design system follows three principles:

  1. Constrained decision spaces — every visual property comes from a finite scale, not open-ended values
  2. Deep modules, simple interfaces — components have small API surfaces with smart defaults
  3. Hierarchy through all channels — size, weight, and color work together for visual hierarchy