White Website Colour System
/* ── Light theme token system ── */
:root {
--bg: #ffffff;
--surface: #f8fafc; /* card background */
--border: #e2e8f0;
--t1: #0f172a; /* headings */
--t2: #475569; /* body text */
--t3: #94a3b8; /* captions */
--accent: #6366f1; /* links and CTAs */
--accent-bg: #eef2ff; /* light accent backgrounds */
}
Frequently Asked Questions
What is the best white HTML website template?
UIXDraft includes both dark and light (white) HTML templates. Light templates use a clean token system (white background, slate text, one accent colour) and score 88–97 on PageSpeed. For free white templates: HTML5 UP's light-background designs (CCA attribution) and Start Bootstrap's business templates (MIT) are the best free options.
Is a white background good for a website?
White backgrounds are best for: e-commerce (product photos look accurate on white), healthcare and professional services (trust and formality), editorial and blog content (maximum reading comfort, 21:1 contrast ratio), and any site where product imagery is the centrepiece. Dark backgrounds outperform white for developer tools, SaaS dashboards, and creative agency portfolios.
How do I make a clean white website in HTML?
Token system: `--bg:#ffffff; --surface:#f8fafc; --text:#0f172a; --muted:#475569; --accent:#6366f1; --border:#e2e8f0`. Apply `background:var(--bg)` to body. Cards get `background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:24px`. Use box-shadow sparingly for depth: `box-shadow:0 1px 3px rgba(0,0,0,.1)`.
What accent colour works best on a white website?
Best accent colours on white backgrounds: Indigo/violet (#6366f1) — versatile, modern. Blue (#3b82f6) — trust, technology. Green (#10b981) — health, finance, growth. Orange (#f97316) — energy, food, retail. Red (#ef4444) — urgency, sales CTAs. All must achieve 4.5:1 contrast ratio on white for WCAG AA compliance — check at webaim.org/resources/contrastchecker.
How do I support both dark and light mode in HTML?
CSS custom property approach: define light theme tokens in `:root`. Redefine dark tokens in `@media(prefers-color-scheme:dark)`. Add `:root[data-theme='dark']` and `:root[data-theme='light']` overrides for a manual toggle button. Never style elements directly inside the media query — always style through the CSS variables. UIXDraft templates include dual-theme support with this architecture.