What this color palette visualizer does
Five pretty color chips sitting side by side in a palette swatch rarely tell you whether they will actually survive inside a real navigation bar, hero headline, CTA button, and metrics card. Colors that look harmonious in equal rectangles often fail contrast checks or clash once a surface occupies 75% of the viewport and an accent shrinks to a 36 px button. This free color palette visualizer applies your four core UI roles—Surface, Ink, Primary, and Muted—live onto three realistic web layouts right inside your browser with zero sign-up and zero uploads.
Unlike single-template previewers that only show one generic landing hero, you can switch instantly across Landing, Dashboard, and Editorial templates, test dark and light polarity in one click with Flip light / dark, and watch live WCAG 2.1 contrast ratios for both body text and button labels.
Every preset swatch in the sidebar comes straight from a curated UINice design system so you can compare dozens of real-world palettes on actual interface layouts before exporting clean CSS variables.
How to preview your color palette on live web layouts
- Choose a Preview layout in the right panel: Landing for marketing heroes and CTA hierarchy, Dashboard for metric cards and dense data labels, or Editorial for reading comfort.
- Click any swatch under Design system palettes to audition a complete curated UINice palette immediately on the live interface.
- Fine-tune any of the Four core roles—Surface (background), Ink (foreground text), Primary (accent CTA), and Muted (secondary captions)—using the four color pickers.
- Click Flip light / dark to swap Surface and Ink instantly and verify whether your primary accent works across both daylight and dark themes.
- Inspect the live Ink / Surface and Button text WCAG contrast ratios right below the color pickers to confirm accessible readability (4.5:1 or higher for normal body copy).
- Click Copy CSS variables to copy the displayed :root stylesheet block—including automatically computed --on-primary button text color—directly to your clipboard.
Contrast math and CSS token specifications
All contrast numbers follow the official WCAG 2.1 relative luminance formula so readability checks match automated accessibility audits.
- Three real DOM preview templates: Landing (top nav, hero badge, headline, primary + ghost buttons, 3 summary cards), Dashboard (metric workspace layout), and Editorial (reading-focused essay header and article blocks).
- Four editable semantic color roles: Surface (--surface), Ink (--ink), Primary (--primary), and Muted (--muted), plus automatic high-contrast button text (--on-primary choosing #ffffff or #111111).
- WCAG 2.1 relative luminance calculation: computes exact contrast ratio from 1:1 to 21:1 for Ink on Surface and Button text on Primary in real time.
- Instant polarity inversion: Flip light / dark swaps Surface and Ink while keeping your Primary and Muted hues intact for rapid dark-mode testing.
- Surface card mixing: preview cards use color-mix() tinting at 5% ink over surface with 10% ink borders so card boundaries remain subtle across both light and dark modes.
- Clean CSS output: copies a ready-to-paste :root { --surface; --ink; --primary; --on-primary; --muted; } block verbatim.
Practical tips for testing UI palettes before coding
- Aim for at least 7:1 Ink / Surface contrast on Editorial and Dashboard layouts so long reading sessions stay comfortable on low-brightness laptop screens.
- Always check the Landing template and Dashboard template together—a vivid primary accent that feels exciting on a hero button can feel loud if repeated across dense dashboard KPIs.
- Use Flip light / dark early in exploration; palettes whose primary accent holds strong contrast on both light and dark surfaces cut theme maintenance in half.
- Keep Muted text darker than 4.5:1 against Surface whenever muted tones carry timestamps, prices, or form labels rather than purely decorative borders.
- Compare three or four UINice design system swatches in sequence to notice how warm off-white surfaces (#f6f2ea, #ecebe6) soften contrast compared with clinical #ffffff.
Common workflows for designers, founders, and developers
Indie founders choosing colors for a new SaaS landing page and engineers refactoring an internal dashboard can validate real interface hierarchy in sixty seconds without spinning up Storybook or editing stylesheets repeatedly. Checking live WCAG ratios alongside real buttons prevents shipping unreadable buttons or washed-out captions across marketing and product surfaces.
Designers presenting two or three brand directions to stakeholders also use live palette switching during review calls so decision-makers evaluate realistic web pages, typography hierarchy, and surface warmth rather than abstract rectangular color stripes.
Everything runs locally in browser memory with zero accounts and zero network uploads, so unpublished brand palettes and early product prototypes remain completely private throughout your color exploration.
Preview and adopt a complete UINice design system
Every preset swatch in the color panel corresponds directly to a real UINice design system, bringing its tested Surface, Ink, Primary, and Muted tokens straight onto the live Landing, Dashboard, and Editorial templates. Beneath the swatches, the panel labels the active design system alongside its signature color dots so you can compare distinct visual directions side by side without leaving the canvas.
When a palette feels balanced across hero banners, metric cards, and editorial copy here, exploring that UINice design system gives you the full companion typography scale, spacing rhythm, border treatments, and interactive component suite built around those exact colors. Moving from live palette preview directly into a proven token architecture eliminates weeks of trial-and-error CSS tweaking.
Questions
How is the Ink / Surface contrast ratio calculated?
It uses the exact WCAG 2.1 sRGB linearization and relative luminance formula to compute ratios from 1:1 up to 21:1. A ratio of 4.5:1 or higher meets WCAG AA for normal body text.
Why does the tool preview three different templates instead of one?
Marketing landing pages, data dashboards, and editorial reading layouts stress different parts of a palette. Switching across all three exposes contrast or hierarchy flaws before you write production CSS.
Does Flip light / dark generate dark mode automatically?
Yes. Clicking Flip light / dark swaps Surface and Ink instantly while automatically recalculating --on-primary button contrast and card surface mixing.
Are my custom colors uploaded to any server?
No. All live DOM previews, contrast checks, and CSS variable exports run 100% locally inside your browser without login.