Tailwind Color Palette Generator
Enter one brand color and get a full scale from 50 to 950 in the same shape as Tailwind's own colors. The shades are built in OKLCH, a color space designed so that equal steps in lightness look equal to the eye, so the scale stays smooth and the hue does not drift. Copy the result as a Tailwind config, a Tailwind v4 theme, or plain CSS variables.
What you enter
- Base color
- Color name
- Base color sits on step
- Code format
What you get
- Base color in OKLCH
- Base step
- Lightest shade (50)
- Darkest shade (950)
How it works
- Pick your base color with the color box. Type a hex code such as #3b82f6 if you prefer.
- Name the color (brand, primary, ocean) and choose which step your base color should sit on. 500 is the usual middle, but a dark brand color often belongs on 600 or 700.
- Check the swatch table. Each shade shows its hex, its OKLCH value and its contrast ratio against white and black.
- Choose a code format and copy it into your project.
Why build a scale in OKLCH
If you build shades by mixing a color with white and black, or by changing the lightness in HSL, the steps look uneven: yellows turn greenish, blues turn purple and some steps look far lighter than their neighbors. That happens because HSL lightness is a mathematical convenience, not a measure of how bright a color looks.
OKLCH was designed around human vision. Changing its lightness by the same amount produces a similar visible change for any hue, and changing chroma leaves the perceived hue alone. A scale made this way has even steps, which is what makes it comfortable to use for hover states, borders, backgrounds and text.
Choosing steps in a real interface
A scale from 50 to 950 is a menu. The lightest steps (50 to 200) suit backgrounds, tinted panels and subtle borders. The middle steps (400 to 600) are for buttons, links and icons. The darkest steps (800 to 950) work for text on light backgrounds and for dark mode surfaces. Sticking to this pattern keeps a site consistent without making color decisions on every page.
Always check contrast before you commit. White text on a 500 shade passes for some hues and fails for others, and the lightness that works for a yellow is very different from the one that works for a blue. The contrast columns show the numbers, so you can pick the first step that passes for your text size.
Tips
- Your exact base color is kept. The generated shades are built around it, so the step you pick returns precisely the hex you entered.
- Place a dark base color on a high step like 700. Otherwise the lighter shades are squeezed and the darker ones have little room.
- Use the contrast columns to choose text colors. A common target for body text is 4.5 to 1 or higher against its background, and 3 to 1 for large text.
- Very saturated colors cannot be shown at every lightness on a screen. Where a shade would fall outside the displayable range, its saturation is reduced just enough to fit.
- Keep gray-leaning brand colors for neutrals. A base with almost no color produces a pure gray scale.
Frequently asked questions
How does the generator build the shades?
It converts your color to OKLCH, which splits a color into lightness, chroma (how colorful it is) and hue. The hue stays fixed. Lightness is spread from about 0.975 at step 50 down to about 0.24 at step 950, anchored so your color lands on the step you chose. Chroma follows a curve that is quieter at the very light and very dark ends. Each result is converted back to hex.
Will it match Tailwind's built-in colors exactly?
No. Tailwind's palettes were tuned by hand, so a generated scale is a close, consistent starting point rather than a copy. If you enter a built-in color such as #3b82f6 you will get a scale of the same character, with that exact color on the step you choose.
Which code format should I use?
For Tailwind version 3 and earlier, use the config format and paste it into the colors section of tailwind.config.js. For Tailwind version 4, use the theme format and paste it into your main CSS file; classes such as bg-brand-500 then work. The CSS variable formats are for any project that does not use Tailwind.
What do the contrast numbers mean?
They follow the WCAG formula: (lighter luminance + 0.05) divided by (darker luminance + 0.05). White against black is 21 to 1. The columns show each shade as text on a white background and on a black background, so you can see which steps are readable on which.
Is my color sent anywhere?
The palette calculations run in your browser. If you choose Continue with this brief, the reviewed colour tokens are sent to WeInc as part of your website brief.
Related: Color contrast checker, Hex color picker, Brand style guide generator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Free Tools
- Terms and Conditions Generator
- Text Diff Checker
- Text Gradient Generator
- Word to HTML Converter
- Time Card Calculator
- Token Counter
- Type Scale Generator
- Unix Timestamp Converter
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App