By · Updated

Colour Palette Generator

Build a Full UI Palette from One Brand Colour

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Colour Palette Generator works

This colour palette generator builds a full UI palette from one colour. Start from one brand colour and get every colour an interface needs: primary and its hover state, a soft tint for secondary buttons, a secondary and an accent chosen by harmony, tinted background and surface layers, border, text and muted text, and success, warning and danger. The preview shows the palette on a real card, and the code gives light and dark sets as CSS custom properties.

Colour palette generator: from one colour to a full set

A brand usually arrives as a single hex code, and the first job of building the interface is turning that one colour into a dozen that work together. Doing it by eye produces palettes where the grey is a different temperature from the blue, the hover state is barely different from the resting state, and dark mode is an afterthought. This generator derives every role from the brand hue with fixed rules, so the result is consistent and can be regenerated when the brand colour changes.

How the roles are derived. Primary is the brand colour, nudged by the mood. Primary hover is the same hue a step darker in light mode and a step lighter in dark mode, which is the direction that reads as "pressed" on each background. Primary soft is a very pale or very deep tint of the hue for secondary buttons, selected rows and badges. Secondary sits halfway to the accent with less saturation, so it supports rather than competes. Accent is the brand hue rotated by the harmony you choose — complementary for maximum contrast, split complementary for a softer opposite, analogous for a calm neighbour, triadic for a bold third.

Neutrals carry the hue. Background, surface, border and text are not pure greys: they carry a small amount of the brand hue, which is what makes a palette feel designed rather than assembled. In light mode the background is nearly white and surfaces are white; in dark mode the background is nearly black and surfaces step up from it, so cards lift off the page in both.

Status colours. Success, warning and danger use fixed green, amber and red hues at a lightness tuned for the theme, since users expect these to look the same across every product and a brand-tinted red is easy to mistake for an accent.

Moods. Vibrant raises saturation, Muted lowers it, Pastel lifts lightness and softens, Deep darkens and enriches. They apply to the coloured roles and leave the neutrals alone.

The output. Light and dark gives a :root block and a prefers-color-scheme: dark override, so switching is automatic. Rename the properties to match your system; the values are plain hex so they work in any browser and any build tool.

FAQ

Do the text colours pass contrast?

Text on background and surface is designed to exceed 7:1 in both modes, and muted text to exceed 4.5:1. White text on the primary depends on your brand colour: a light brand such as yellow will fail, and the Deep mood or a darker input fixes that. Check any final pair with the contrast checker.

Can I use this with Tailwind?

Yes. Put the custom properties in your base layer and reference them in the theme configuration as primary: 'var(--primary)', or paste the hex values into the palette directly. The role names match what most Tailwind projects already call their tokens.

Why is the dark mode primary lighter than the light mode one?

A saturated mid-tone that looks right on white looks heavy and loses contrast on near-black. Lifting it a little keeps the brand recognisable while giving text and icons enough contrast, which is the same adjustment most design systems document for their dark themes.

How do I get more shades of the primary?

Use the tint and shade scale tool, which builds a 50 to 950 ramp from one colour. This page gives the roles; that page gives the steps within a role, and the two are meant to be used together.

See also: all Colour tools, Layout & Spacing, Shadows & Motion, Shapes & SVG, UI Components, Forms & Inputs.

Related tools