Nectar UI/
Foundation
Tailwind v4 • CSS VariablesColors.
A semantic color system powered by Tailwind v4 variables. We separate 'Primitives' (the raw values) from 'Semantics' (their function) to allow for safe theming and dark mode adaptation.
bg-primary text-primary-foregroundSemantic Aliases (The API)
Copy Class
Primary
--primaryMain Actions (Buttons)
Copy Class
Accent
--accentActive States & Brand Elements
Copy Class
Background
--backgroundApp Canvas
Copy Class
Surface
--cardCards & Modals
Copy Class
Muted
--mutedSecondary Backgrounds
Primitive Tokens (Source of Truth)
Forest Green#025a4e
Vermilion#E35028
Warm Beige#EDEBE8
Off White#F9F9F8
Ink Black#1D1D1F
CSS-as-an-API
I treat CSS variables as a strict API. Components consume semantic tokens (e.g., --radius-interaction), never magic numbers. This decouples the design decisions from the component logic.
Oklch & P3 Gamut
Future-proofing the system. While currently using Hex for compatibility, the infrastructure is set up to migrate to OKLCH for wider color gamut support on modern displays.
globals.css