A palette is not “five pretty colors”—it’s a system. If you choose shades one at a time, based on what you like in the moment, the interface will become inconsistent within six months: buttons in different blues, links that are sometimes teal and sometimes indigo, and gradients in the footer and header that have nothing in common. Let’s look at how to build a palette that works as a design system, not a random collection of HEX codes.
We’ve already covered color models (HEX, RGB, HSL) and how WCAG contrast is calculated separately. This article focuses on the process: how to go from a blank screen to a cohesive palette that you can encode in a Tailwind config or CSS variables.
Where a palette begins
Not with colors. Start with three questions:
- What emotion should the product evoke? Fintech and trust are usually associated with blue or dark blue. Health and care tend to call for soft green. Entertainment can use any bright color. These aren’t strict rules, but starting points you can consciously move away from.
- Who is the audience, and in what context will they view the interface? A B2B dashboard that people use for 6 hours a day shouldn’t tire their eyes with harsh, vivid accents. A landing page with a single CTA can afford much more contrast and brightness.
- What constraints already exist? A logo, a brand color specified in brand guidelines, or colors built into an existing UI kit—it's better to build the palette around these than to ignore them.
Only after that does it make sense to open the palette generator.
Anatomy of a working palette
A working palette for a website or app isn’t just one color. It has five roles:
1. Primary
The brand color. Used for key CTAs, active states, and accent elements. There should be just one—if there are several “primary” colors, the interface loses its hierarchy, and users won’t know what to look at first.
2. Secondary
A supporting color for elements that matter but shouldn’t compete with the primary color for attention, such as secondary buttons, badges, and decorative accents.
3. Neutral scale (neutrals)
This isn’t “one gray” but a scale of 8-10 shades, from almost white to almost black. Neutrals make up 80% of the interface: backgrounds, text, borders, and dividers. A well-designed neutral scale with the right contrast between adjacent steps saves more design time than any bright accent.
A practical point: pure black (#000000) against pure white (#FFFFFF) creates too harsh a contrast for long passages of text and can tire the eyes. Most good design systems use dark gray (for example, #1A1A2E or a similar shade) instead of pure black for text.
4. Semantic colors (status colors)
Success, error, warning, and information—green/red/yellow/blue, or variations of these. This is the one area where you should stick close to users’ intuitive associations: red for errors is almost universal, so experimenting here is risky.
5. Accent colors
Optional—one or two additional colors for illustrations, charts, or highlighting individual blocks. They shouldn’t be confused with semantic colors (don’t use the same green for an accent as for “success”—users may subconsciously read it as a status).
How to choose shades within each role
The modern approach is not “5 random colors,” but a scale of shades of a single hue (50, 100, 200 ... 900, as in Tailwind). This gives you flexibility: a light shade of the primary color for a notification background, a dark shade for text on that background, with everything looking cohesive because it comes from the same point in color space.
Technically, this is done with HSL: by changing only Lightness (and slightly adjusting Saturation) while keeping Hue fixed, you get a cohesive scale of a single color. You don’t need to calculate everything by hand—that’s what palette generators are for; they automatically build a scale from a base color.
Common mistakes
Too many primary colors. If your palette has five equally important “bright” colors, that’s not a palette—it’s chaos. The eye should have one place to go first.
Ignoring dark mode from the start. If dark mode is even a possibility, design the palette for both modes from the outset. Otherwise, you may find later that half the shades are unreadable against a dark background.
Choosing colors “by feel” without checking contrast. A beautiful palette in Figma can completely fail accessibility requirements in a real UI. It’s especially important to check the contrast between text and background for neutral and semantic colors. This isn’t an aesthetic nitpick; it’s a requirement for some users who otherwise won’t be able to read the interface.
Using overly saturated colors across large areas. A color that looks great on a 40×120px button may be unbearable when used to fill an entire section background. Before approving a palette, it’s useful to look at the colors not only as swatches, but also in realistic interface proportions.
Inconsistency between product sections. Marketing websites and the products themselves (user accounts, dashboards) are often built by different teams at different times, and their palettes drift apart. If both use the same brand, they should share a neutral base and primary color, even if their accents differ slightly to suit the context.
Checklist before approving a palette
- One primary role is defined, with no competition between several “main” colors;
- The neutral scale has at least 6-8 steps, rather than just one gray;
- Semantic colors (success/error/warning) are intuitive and don’t overlap with accents;
- Text and background combinations have been checked for contrast;
- The palette has been tested in realistic interface proportions, not just as swatches;
- Dark mode has been considered, if it’s planned;
- The palette is stored as variables (CSS custom properties, Tailwind config, design tokens), rather than as “HEX codes I more or less remember.”
Conclusion
A good palette isn’t one that looks pretty in a preview of five circles; it’s one that holds up under real-world demands: hundreds of components, different states, accessibility, and dark mode. Build it as a system—with roles, scales, and verified contrast—not as a set of “favorite colors.”
If you need a starting point, build a basic scale with the color palette generator, refine specific values with the color picker, and be sure to run the final text/background combinations through the contrast checker before committing the palette to code.