Colors
UI Color Theme Generator
Used by developers, writers, and creators worldwide.
A UI color theme generator that outputs a complete, role-based palette — primary, secondary, accent, background, surface, and text — saves you from assembling colors piecemeal and hoping they work together. Designers and front-end developers use it to bootstrap a coherent color system before opening Figma or writing a single CSS variable. The single input that matters most is mode: Light and Dark aren't mirror images of each other. Light themes use near-white canvases with subtle surface lifts, while dark themes require carefully tuned midtones to stay legible without eye strain. Generate the mode you need and get a coordinated set ready to validate against WCAG contrast ratios.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Select Light or Dark from the Mode dropdown to match your project's target interface style.
- Click Generate to produce a full set of coordinated UI color roles instantly.
- Review each color role — primary, secondary, accent, background, surface, and text — and note the hex values.
- Copy the hex codes into your design tool or codebase, assigning each value to its corresponding role or token name.
- Regenerate as many times as needed until the overall feel and hue direction suit your brand, then refine individual roles from there.
Use Cases
- •Bootstrapping Figma local styles with semantic role names before a client presentation
- •Setting custom color tokens in tailwind.config.js for a new SaaS dashboard
- •Generating a dark-mode palette for an analytics app and mapping hex values to CSS custom properties
- •Populating a Storybook design-token file with harmonized light-mode colors before component builds
- •Getting a base color system to hand off with a Figma component kit and dev handoff notes
Tips
- →Generate several themes in a row and screenshot each one — comparing three or four options side by side reveals tonal range you'd miss evaluating them one at a time.
- →The surface color is often the most overlooked — if it's too close to the background in dark mode, cards will look flat; bump its lightness up by at least 5% if that happens.
- →Before finalizing, paste your primary and accent colors into a contrast checker against both your background and surface values — they will behave differently on each.
- →In dark mode, avoid using pure black (#000000) as your background even if the generator produces it — swap it to #0F0F0F or similar to reduce screen harshness and make surfaces more distinct.
- →Name your Figma or CSS tokens by role, never by color value — calling a token Color/Primary lets you swap the hex later without renaming every component that uses it.
- →Use the accent color exclusively for one interactive element type per screen; if you apply it to both buttons and links, users lose the visual cue that accent signals importance.
FAQ
how many colors does a ui color theme actually need
At minimum, six roles: primary, secondary, accent, background, surface, and text. Surface is separate from background — it covers cards, modals, and panels that need to visually lift from the page canvas. Error, warning, and success states come after the core set is stable and contrast-checked.
difference between light and dark mode color themes — can I just invert one
Inverting a light theme almost always breaks contrast and vibrancy. Dark themes need backgrounds in the 10–20% lightness range, surfaces 4–8% lighter than the background, and brand colors shifted lighter to stay vivid. Use the mode selector to generate each version independently rather than flipping one manually.
how do I add generated ui colors to tailwind and css custom properties
In tailwind.config.js, add hex values under theme.extend.colors with semantic keys like primary, surface, and foreground — then reference them as bg-primary or text-foreground. For plain CSS, declare each as a variable in :root (e.g. --color-primary: #4F6AF5) and redefine the same names inside a prefers-color-scheme: dark media query so components switch automatically.