Browse docs

Color

Open full example →
On this page
  1. Brand ramp
  2. Semantic colors
  3. Focus ring
  4. Enterprise theme palettes
  5. Override colors

Colors use OKLCH. Semantic colors use light-dark() to follow the active color scheme. The tables below show the declarations from 02-tokens.css; explicit themes and forced-colors overrides live in 03-themes.css.

Brand ramp

Override the --pl-brand-* properties to change the brand palette. Semantic accent colors refer to this ramp.

Brand colors
TokenDefault value
--pl-brand-1oklch(97% 0.02 82deg)
--pl-brand-2oklch(89% 0.05 82deg)
--pl-brand-3oklch(80% 0.09 82deg)
--pl-brand-4oklch(70% 0.13 82deg)
--pl-brand-5oklch(63% 0.15 82deg)
--pl-brand-6oklch(56% 0.14 82deg)
--pl-brand-7oklch(48% 0.11 82deg)
--pl-brand-8oklch(39% 0.07 82deg)
--pl-brand-9oklch(29% 0.04 82deg)

Semantic colors

Use semantic foreground and background pairs rather than choosing a raw brand color for each component. For example, pair --pl-color-accent with --pl-color-accent-text. Status colors have a fill, a background tint, and a text color. The contrast tests check the intended text/background pairs in both themes.

Semantic color defaults
TokenDefault value
--pl-color-bglight-dark(oklch(98% 0.005 60deg), oklch(14% 0.008 55deg))
--pl-color-surfacelight-dark(oklch(100% 0 0deg), oklch(18% 0.008 55deg))
--pl-color-surface-2light-dark( oklch(94% 0.008 60deg), oklch(22% 0.012 55deg) )
--pl-color-textlight-dark(oklch(20% 0.012 55deg), oklch(96% 0.008 60deg))
--pl-color-text-mutedlight-dark( oklch(46% 0.015 55deg), oklch(72% 0.012 55deg) )
--pl-color-text-faintlight-dark( oklch(48% 0.015 55deg), oklch(68% 0.012 55deg) )
--pl-color-text-disabledlight-dark( oklch(50% 0.012 55deg), oklch(58% 0.01 55deg) )
--pl-color-borderlight-dark( oklch(80% 0.015 55deg / 75%), oklch(45% 0.012 55deg / 30%) )
--pl-color-accentlight-dark(var(--pl-brand-7), var(--pl-brand-4))
--pl-color-accent-textlight-dark(white, oklch(16% 0.01 55deg))
--pl-color-accent-hoverlight-dark( color-mix(in oklab, var(--pl-color-accent), oklch(16% 0.01 55deg) 10%), color-mix(in oklab, var(--pl-color-accent), white 12%) )
--pl-color-accent-subtlecolor-mix( in oklab, var(--pl-color-accent) 15%, transparent )
--pl-color-dangeroklch(60% 0.22 25deg)
--pl-color-danger-bglight-dark( oklch(96% 0.04 25deg), oklch(22% 0.08 25deg) )
--pl-color-danger-textlight-dark( oklch(36% 0.18 25deg), oklch(90% 0.06 25deg) )
--pl-color-danger-bordercolor-mix( in oklab, var(--pl-color-danger), transparent 55% )
--pl-color-successoklch(58% 0.18 150deg)
--pl-color-success-bglight-dark( oklch(96% 0.04 150deg), oklch(22% 0.08 150deg) )
--pl-color-success-textlight-dark( oklch(34% 0.15 150deg), oklch(82% 0.15 150deg) )
--pl-color-warningoklch(62% 0.19 75deg)
--pl-color-warning-bglight-dark( oklch(96% 0.06 75deg), oklch(24% 0.09 75deg) )
--pl-color-warning-textlight-dark( oklch(40% 0.17 75deg), oklch(84% 0.15 75deg) )
--pl-color-scrimoklch(0% 0 0deg / 55%)

Focus ring

The focus color changes with the color scheme. The offset and width control the visible outline around keyboard-focused controls.

Focus ring defaults
TokenDefault value
--pl-focus-colorlight-dark(oklch(52% 0.14 82deg), oklch(72% 0.13 82deg))
--pl-focus-offset2px
--pl-focus-size2px
--pl-focus-glow-opacity85%

Enterprise theme palettes

Porchlight provides seven pre-baked enterprise palette presets via the data-pl-palette attribute declared on :root, <html>, <body>, or scoped to any subtree container. Each preset configures brand ramps, surfaces, text, borders, and accent colors with tested WCAG AA contrast in both light and dark modes:

Palette Aesthetic Best Suited For Accent Tone (Light / Dark)
slate Cool neutral gray B2B SaaS, developer tooling, workflow engines Indigo steel (oklch(46% 0.1 250deg) / oklch(70% 0.1 250deg))
zinc Crisp monochromatic Technical analytics, hardware consoles, terminal views High-contrast neutral (oklch(22% 0 0deg) / oklch(92% 0 0deg))
midnight Deep nocturnal blue-gray SOC/SIEM cockpits, dark-first monitoring dashboards Electric cobalt (oklch(44% 0.15 275deg) / oklch(68% 0.15 275deg))
emerald Warm emerald green Fintech, banking, sustainability, wealth management Emerald green (oklch(43% 0.12 155deg) / oklch(71% 0.13 155deg))
amethyst Vibrant deep purple AI / LLM observability, data science, evaluation consoles Vibrant purple (oklch(44% 0.14 305deg) / oklch(71% 0.14 305deg))
crimson Vivid ruby/crimson Security, incident response, high-risk SOC triage Ruby crimson (oklch(43% 0.15 25deg) / oklch(71% 0.15 25deg))
cyan Electric cyan/teal Cloud infrastructure, Kubernetes clusters, telemetry Electric cyan (oklch(42% 0.11 195deg) / oklch(71% 0.12 195deg))

--pl-color-accent-hover and --pl-color-accent-subtle are always derived from the active --pl-color-accent: a color-mix() fallback ships in 02-tokens.css, and CSS Relative Color Syntax upgrades both values where supported. Palettes add @media (color-gamut: p3) wide-gamut enhancements for vivid accents.

Override colors

See the theming guide to override tokens in your application.

Search Porchlight