Skip to content

Tailwind Color Palette Generator

Generate Tailwind color palettes from HEX, with live preview and v3 or v4 config. Free and no signup.

  • 100% free
  • No Signup
  • Tailwind v3 and v4

Generated palette

Click any shade to copy its HEX code.

Live preview
New Palette preview

See how your shades look on buttons, badges and cards.

Export code


        
ADVERTISEMENT
Demo Ad 728 x 90 320 x 100

How to generate a Tailwind color palette

  1. 1

    Pick a base color

    Choose a color or paste a HEX code. It becomes your 500 shade.

  2. 2

    Fine tune

    Name the color and adjust saturation and the lightness range.

  3. 3

    Copy the code

    Copy the Tailwind v3 or v4 config and use the classes in your project.

TAILWIND COLOR GUIDE

Tailwind Color Palette Generator – Create Custom Tailwind CSS Colors from Any HEX Code

Every Tailwind CSS project starts with the same question: which colors will define the look of your brand, and how do you turn a single brand color into the complete scale of shades that Tailwind expects? Our free Tailwind color palette generator answers that question in seconds. Enter any HEX code, and the tool builds a full Tailwind CSS color palette from shade 50 all the way to shade 950, with your original color anchored at 500. You get a live preview, accessible text colors on every swatch, and ready-to-paste code for Tailwind CSS v3 and Tailwind CSS v4. Whether you are searching for a Tailwind color shades generator, a way to generate Tailwind colors from HEX, a custom Tailwind color palette maker or a quick Tailwind CSS color scale generator for a design system, this page does the job directly in your browser with no signup, no plugin and no watermark. Your colors never leave your device, which keeps the tool fast and private.

Tailwind Color Shades Generator

Create eleven consistent shades, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900 and 950, from one base color. The scale follows the same structure as the default Tailwind palette, so classes like bg-brand-500 and text-brand-900 work exactly as you expect.

Tailwind v3 and v4 Config Export

Copy the palette as a theme block for Tailwind CSS v4, as a colors object for the tailwind.config.js file used in Tailwind v3, as plain CSS variables, or as a simple HEX list for Figma and documentation.

Live Preview and Readable Text

See your palette applied to buttons, badges and cards before you commit to it. Each swatch shows a readable text color, so you can quickly judge which shades are safe for text and which are best used as backgrounds.

What Is a Tailwind Color Palette and Why Does Every Project Need One?

Tailwind CSS is a utility-first framework, which means you style elements by adding small classes such as bg-indigo-500, text-slate-700 or border-rose-200 directly in your markup. Behind every one of those classes is a color scale: a set of numbered shades running from a very light tint at 50 to a very dark tone at 950. The default Tailwind palette ships with many ready-made scales such as slate, gray, red, orange, amber, green, teal, blue, indigo, violet and pink, and for a lot of prototypes those are more than enough. The moment you work on a real brand, however, the default colors stop being enough. Your logo has a specific blue, your client has a specific green, and your product needs a primary color that nobody else on the web is using.

That is where a custom Tailwind color palette becomes essential. A good palette gives you light tints for backgrounds and hover states, a strong middle shade for buttons and links, and deep shades for text, borders and dark mode surfaces. Building those eleven shades by hand is slow and error-prone, because every shade has to feel related to the others while still being clearly different in lightness. A Tailwind color palette generator automates that work and gives you a consistent scale you can reuse across every component, page and project.

How to Generate Tailwind Colors from a HEX Code (Step by Step)

Generating a Tailwind CSS color palette with this tool takes less than a minute, and you do not need to understand color theory. Follow the steps below to turn one HEX code into a complete, copy-ready palette.

  1. Choose your base color: Use the color picker or type a HEX code such as #6366f1. This color becomes the 500 shade of your palette.
  2. Give the color a name: Type a name like brand, primary or ocean. The name is used in the exported code and in your class names, for example bg-brand-500.
  3. Adjust saturation if needed: Use the saturation slider to make the whole scale slightly more vivid or more muted without changing the hue.
  4. Pick a lightness range: Soft keeps shades close to your base color, Balanced matches the feel of the default Tailwind scales, and Wide pushes the lightest and darkest shades further apart.
  5. Review the live preview: Check the swatches, the readable text colors and the sample button, badge and card.
  6. Copy the code: Select Tailwind v4, Tailwind v3, CSS variables or HEX list, then copy the code or download it as a file.

If you do not have a color in mind yet, press Random base color. It is a quick way to discover a Tailwind palette idea, and every random result is generated with the same consistent shade logic.

Understanding the Tailwind 50 to 950 Shade Scale

The numbers in Tailwind color classes are not random. They describe where a shade sits between almost white and almost black. A low number like 50 or 100 is a very light tint, ideal for page backgrounds, subtle highlights and the background of alerts and badges. The middle numbers 400, 500 and 600 are the working colors of your interface: buttons, links, icons, focus rings and chart series. The high numbers 800, 900 and 950 are deep tones that work as body text, headings, dark mode backgrounds and strong borders. Because the numbering is the same for every color in Tailwind, you can swap bg-blue-600 for bg-brand-600 without rethinking your design.

What each Tailwind shade is typically used for
Shade Role in the palette Typical use
50 - 100Lightest tintsPage and section backgrounds, alert and badge backgrounds
200 - 300Soft tintsBorders, dividers, hover backgrounds, disabled states
400Light accentIcons, secondary accents, dark mode links
500Base colorBrand identity, primary buttons, focus rings, charts
600 - 700Strong accentButton hover and active states, links on white, headings
800 - 900Deep tonesBody text, dark navigation, text on light tints
950Almost blackDark mode backgrounds, footers, maximum contrast text

How This Tailwind Color Scale Generator Builds Each Shade

A palette that simply mixes your color with white and black often looks washed out or muddy, so this generator works in the HSL color model, which separates hue, saturation and lightness. Your base color keeps its hue across the entire scale, which is what makes all eleven shades feel like one family. Lighter shades move smoothly toward a very high lightness, darker shades move smoothly toward a very low lightness, and the steps are spaced so that neighboring shades are clearly distinguishable, similar to the way the official Tailwind scales are built. The saturation slider lets you correct the common problem where tints look too gray or deep shades look too heavy, and the lightness range option controls how far the scale stretches toward white and black.

Because the base color is locked to shade 500, you can always trust that your brand color appears exactly as entered. The rest of the scale is generated around it. If you later decide your brand color should sit at 600 instead, simply copy the shade you want as your primary and use the neighbors as hover and active states.

Add Custom Colors in Tailwind CSS v4 with the Theme Block

Tailwind CSS v4 moved configuration into your CSS file. Instead of editing a JavaScript config, you define design tokens inside a theme block in your main stylesheet, and every variable named with the color prefix automatically becomes a family of utility classes. When you choose the Tailwind v4 export in this tool, you receive a block of variables such as color-brand-50 through color-brand-950. Paste that block into your CSS file after the Tailwind import, and you can immediately use bg-brand-500, text-brand-700, border-brand-200, ring-brand-400 and every other color utility, including hover and dark mode variants.

This approach keeps your palette in one place, makes it easy to review in a pull request and works well with the CSS variables your browser already understands, so you can also use the same colors in custom CSS, inline styles or JavaScript charting libraries without extra tooling.

Add Custom Colors in Tailwind CSS v3 with tailwind.config.js

If your project still uses Tailwind CSS v3, which is common in older codebases, Laravel starter kits and many tutorials, colors are added in the tailwind.config.js file. The recommended place is the extend section under theme, so you add your new palette without removing the default colors. Select the Tailwind v3 export in this tool, copy the colors object, and paste it inside theme.extend. After you rebuild your CSS, classes like bg-brand-500, text-brand-900 and hover:bg-brand-600 become available.

A useful tip for Laravel developers is to make sure your content paths include your Blade files, for example resources/views/**/*.blade.php. Tailwind only generates classes it finds in those files, so a missing path is the most common reason a new custom color appears not to work. If you use a build tool such as Vite, restart the dev server after changing the config.

Pick the Right Tailwind Color Palette for Your Brand

Choosing a base color is a design decision first and a technical one second. Blues and indigos communicate trust and stability, which is why finance, software and health products use them so often. Greens suggest growth, money and wellness. Reds and oranges create urgency and energy, and are popular for food, sales and entertainment. Purples and violets feel creative and premium, and pinks and roses feel friendly and modern. Start with the emotion you want your product to carry, enter a HEX code in that family, and use the generated shades to see how it feels in real interface components.

Color families and the feeling they create
Color family Feeling Popular for
Blue and indigoTrust, calm, professionalSaaS, banking, healthcare, dashboards
Green and tealGrowth, health, natureFintech, wellness, eco brands, success states
Red and roseUrgency, passion, energySales, food, alerts, entertainment
Orange and amberFriendly, warm, optimisticMarketplaces, education, warnings
Purple and violetCreative, premium, imaginativeCreative tools, beauty, gaming, startups
Slate and grayNeutral, clean, minimalText, borders, backgrounds, dark mode

Accessible Color Contrast: Which Tailwind Shades Are Safe for Text?

A beautiful palette is only useful if people can read it. The Web Content Accessibility Guidelines recommend a contrast ratio of at least 4.5 to 1 for normal body text and 3 to 1 for large text. A simple rule of thumb with any Tailwind color scale is to use shades 700 to 950 for text on light backgrounds, and shades 50 to 200 for text on dark backgrounds. A 500 shade is often just on the edge: it usually works for large headings and white button labels on darker brand colors, but it may fail for small body text on a white page. The swatches in this tool automatically switch between white and dark text, so you can see at a glance which shades are comfortable to read.

Always test your final combinations, especially for small text, form labels and placeholder text. Using a darker shade such as 600 or 700 for links and button backgrounds is a simple way to improve contrast while keeping the same hue, and it is exactly the kind of decision a full 50 to 950 scale makes easy.

Using Your Palette for Dark Mode and Design Systems

A complete shade scale makes dark mode far easier. In a typical setup, light mode uses shade 50 for backgrounds and shade 900 for text, while dark mode flips the roles and uses shade 950 or 900 for backgrounds and shade 100 for text. Because every shade comes from the same hue, the interface keeps its identity in both themes instead of looking like two different products. You can also use shades 400 and 300 for links and highlights in dark mode, where the brighter tones stand out against deep backgrounds.

For teams, the exported palette works as a set of design tokens. Store the generated variables in one stylesheet, share the HEX list with designers for Figma or Adobe XD, and document which shade is used for primary buttons, hover states, borders and focus rings. A consistent token set reduces design debt and keeps large codebases easy to maintain.

Practical Tips for Better Custom Tailwind Palettes

  • Start from your brand HEX: Paste the exact color from your logo or style guide so the 500 shade matches your brand perfectly.
  • Use semantic names: Names like brand, primary, accent or surface are easier to maintain than names tied to a specific hue like blue.
  • Keep neutrals separate: Generate a second palette from a gray or slate base for text, borders and backgrounds, and keep your brand color for actions and highlights.
  • Limit your accent colors: One primary and one or two supporting palettes are usually enough for a clean, consistent interface.
  • Check hover and active states: Use 600 for hover and 700 for active on a 500 button for a natural pressed effect.
  • Test on real screens: Colors look different on phones, monitors and in sunlight, so check key screens on more than one device.
  • Re-generate with saturation changes: If light shades look gray, add a little saturation. If deep shades look too heavy, reduce it.

Tailwind Color Classes You Can Use With a Custom Palette

Once a custom color is registered, it works with the usual color utilities. The examples below assume the color name is brand.

Tailwind color utility examples
UtilityExample classWhat it styles
Backgroundbg-brand-500Element fill
Texttext-brand-700Font color
Borderborder-brand-200Border color
Ringring-brand-400Ring used for focus styles
Fill and strokefill-brand-600SVG shapes
Gradient stopfrom-brand-500Start color of a gradient
Opacity modifierbg-brand-500/50Color at 50% opacity

How to Use Semantic Colors in Tailwind CSS

Numbered shades describe how light a color is, while semantic names describe its job. In Tailwind v4 you can map a role to a variable, for example with --color-primary: var(--brand-primary); inside an @theme inline block, and then change --brand-primary for each theme. This lets markup use bg-primary while the actual value is managed in one place. For a small site, using the numbered classes directly may be simpler.

Replace or Extend the Default Tailwind Colors

Adding a new name keeps the default Tailwind palette available beside your own. In version 4, if you want only your own colors, you can add --color-*: initial; at the start of the theme block before declaring them, and include any black, white or neutral colors you still need. In version 3, placing colors under theme.extend adds to the defaults, while placing them directly under theme.colors replaces the set. Check existing pages before removing defaults.

Why Are My Custom Tailwind Colors Not Working?

  • Name mismatch: The class must use the same name as the color in your theme.
  • Wrong version format: A version 4 theme block and a version 3 config object are set up differently.
  • Dynamic class names: Tailwind looks for complete class names in source files, so avoid building them from string pieces.
  • Build not updated: Restart or rebuild if your CSS was not regenerated.
  • Old browser output: Check the browser support of the Tailwind version you use.

Brand Color vs Shade 500: Choosing the Right Button Color

This generator places your base color at 500. That does not automatically make 500 the right button color. A light or very bright brand color may need dark text, or a deeper shade such as 600 or 700 for white labels. Test the label against the real fill, including hover states, before adding the classes across your project.

Related Color Tools for Tailwind Projects

Check text pairs in the Contrast Checker, export plain custom properties with the CSS Color Variable Generator, build a full theme with the CSS Color Scheme Generator, or find an accent with the Complementary Color Generator.

Free Tailwind CSS Color Generator for Developers, Designers and Students

This tool is built for anyone who works with Tailwind CSS: front-end developers who need a quick custom palette for a client site, designers who want to hand off a precise color scale, freelancers building landing pages, students learning utility-first CSS and founders styling an MVP. It works with Laravel, React, Next.js, Vue, Nuxt, Svelte, Astro, Angular and plain HTML, because the output is standard Tailwind configuration and CSS variables. Everything runs in your browser, so the generator is instant, free and private.

Ready to build your palette? Scroll up, enter your brand HEX code, review the 50 to 950 shades and copy the code into your project. If you also work with gradients or PDFs, explore the other free tools on our site.

ADVERTISEMENT
Demo Ad 300 x 250 300 x 250
COMMON QUESTIONS

Tailwind Color Palette Generator FAQ

Quick answers about generating Tailwind colors, using the 50 to 950 scale and adding custom colors to your project.

How do I generate a Tailwind color palette from a HEX code?

Enter your HEX code in the base color field or choose it with the color picker. The tool instantly creates eleven shades from 50 to 950 with your color as the 500 shade. Then copy the code in the format you need.

Does this work with Tailwind CSS v4 and v3?

Yes. Choose Tailwind v4 to get theme variables for your CSS file, or Tailwind v3 to get a colors object for tailwind.config.js. You can also export plain CSS variables or a simple HEX list.

How do I add the generated colors to my Tailwind project?

For Tailwind v4, paste the copied variables into your main CSS file after the Tailwind import. For Tailwind v3, paste the colors object inside theme.extend in tailwind.config.js. After that you can use classes such as bg-brand-500, text-brand-900 and border-brand-200.

Why is my base color the 500 shade?

In Tailwind, 500 is the middle of the scale and the usual main color of a family. Locking your base color to 500 guarantees your exact brand HEX appears in the palette, while lighter and darker shades are built around it.

Are the generated shades the same as the official Tailwind colors?

No. The structure is the same, with the same 50 to 950 numbering, but the shades are calculated for your own color. They are designed to feel similar in spacing and balance to the default Tailwind scales without copying them.

Can I use the palette for commercial projects?

Yes. The colors and code generated by this tool are created for you on demand, so you can use them in personal and commercial websites, apps and design systems without attribution.

Is my color data saved or uploaded anywhere?

No. The generator runs entirely in your browser, so your colors are not uploaded or stored on our servers, and no account is needed.

ADVERTISEMENT
Demo Ad 728 x 90 320 x 100