Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

This free tool allows you to generate a complete Tailwind CSS color scale from 50 to 950 out of any hex color, with ready-to-paste config for Tailwind v3 and v4.
Used as the color key in config output (brand)
Pin light pastels to 200 to 300 and dark brand colors to 600 to 700 so the rest of the scale stays usable.
Click any swatch to copy its hex value.
Card title
Sample text using the generated scale.
Paste under theme.extend.colors in your Tailwind v3 config file.
Add to your global CSS for Tailwind v4 projects using CSS-first configuration.
A Tailwind Color Generator builds a complete custom color scale, shades 50 through 950, from a single hex input so you can theme Tailwind projects without hand-tuning eleven stops. Unlike a hex-to-Tailwind class converter that maps one color to the nearest existing utility such as bg-blue-500, this tool creates a brand-new palette keyed to your chosen name.
Tailwind ships with curated palettes like blue and slate, but product teams often need colors that match a logo or design system. Manually deriving lighter tints and darker shades while keeping hue consistent is tedious and error-prone. Designers sometimes export dozens of swatches from Figma. Developers then re-type each hex into a config file and hope the ramp feels balanced. This generator removes that friction by applying a predictable lightness curve, preserving your exact brand hex at the pinned stop, and outputting configuration you can paste directly into Tailwind v3 or v4.
The result is a cohesive ramp you can use for backgrounds, borders, buttons, links, and typography with familiar class patterns like bg-brand-50 or text-brand-800. Because every shade shares the same hue family, hover and active states feel intentional rather than patched together from unrelated defaults. That consistency is what separates a polished interface from one where every accent color was picked ad hoc.
If you only need to find the closest existing Tailwind class for a hex value, a converter tool is the right choice. When you need a wholly new named scale, for example brand, accent, or surface, that coexists with Tailwind defaults, a palette generator is the correct workflow. This page focuses on that generation path end to end.
Standardizing on Tailwind's 50 to 950 naming convention also helps cross-functional teams speak the same language. Designers can reference brand-600 in specs, developers apply bg-brand-600 in JSX, and QA file bugs against the same token without translating between hex, RGB, and arbitrary class names on every ticket.
Building a Tailwind-ready palette takes less than a minute. The tool updates live as you change inputs. There is no submit button. Follow these four steps:
You can start from a brand guideline PDF, a screenshot eyedropper sample, or experimentation with the Random button. Once the swatches look right, download both exports if your organization is mid-migration so design and engineering share identical hex values regardless of which Tailwind version a repo uses.
After pasting the config, restart your dev server or rebuild so Tailwind picks up the new tokens. You can then reference any generated shade with standard utility prefixes. Background, text, border, ring, and outline classes all work the same way they do for built-in colors. For component libraries, document which stops map to primary, secondary, success, and warning roles so teammates pick shades consistently.
The live preview updates instantly when you drag the picker, edit hex text, rename the palette, or change the pinned shade. That immediate feedback helps you compare pinning at 500 versus 600 before committing a config to your repository, which is especially useful when brand guidelines specify a single hex but leave the full ramp undefined.
Invalid hex input shows an inline error and pauses output until the value is corrected, so you never copy a broken config snippet. Valid shorthand like #RGB expands to six-digit form automatically, matching how most design tools display hex values in inspect panels and style guides.
Tailwind's numeric scale is a lightness ladder, not an opacity level. Lower numbers are lighter tints. Higher numbers are darker shades. The generator follows the same eleven-stop convention Tailwind uses for built-in palettes so your custom colors behave predictably in design systems.
Built-in palettes such as slate and zinc feel neutral because their hue shifts subtly across the ramp. This tool keeps hue locked to your brand color instead, which is what you want for accent families. Neutral UI grays are still best sourced from Tailwind defaults or a separate gray scale rather than forcing a saturated brand hue into every surface role.
| Shade | Typical Use |
|---|---|
| 50 to 100 | Subtle backgrounds, tinted surfaces, and hover washes on light UI |
| 200 to 300 | Borders, dividers, disabled states, and soft hover backgrounds |
| 400 to 500 | Icons, badges, primary accents, and the default brand stop |
| 600 to 700 | Primary buttons, links, focus rings, and interactive emphasis |
| 800 to 950 | Headings, high-contrast text on light backgrounds, and dark UI chrome |
Pinning matters because it tells the generator where your source hex sits on this ladder. If your logo green is naturally a mid-tone, pin 500. If it is already a soft mint, pin 200 or 300 so the tool does not force unnatural extremes at the light end of the ramp. Teams working in both light and dark mode often generate two palettes from the same hue with different pin values. One anchored for light surfaces and one for dark chrome.
Remember that shade numbers are relative within your custom palette, not global across Tailwind. Your brand-500 and Tailwind's blue-500 will differ in absolute hex value even though both represent a mid accent in their respective families. That independence is the point: you gain semantic class names tied to your brand without overwriting framework defaults.
Tailwind v3 and v4 both support custom palettes, but they express tokens differently. v3 keeps colors in JavaScript configuration. v4 moves toward CSS-first design tokens with @theme variables. This tool exports both formats from the same generated scale so you do not maintain two sources of truth.
Large teams sometimes standardize on a shared npm package that exports theme extensions. You can paste the v3 object directly into that package, or check the v4 CSS block into a design-tokens stylesheet consumed by multiple apps. Either approach beats scattering slightly different hex values across micro-frontends.
| Aspect | Tailwind v3 | Tailwind v4 |
|---|---|---|
| Config location | tailwind.config.js under theme.extend.colors | Global CSS file with @theme directive |
| Token format | Nested JS object with shade keys | CSS custom properties (--color-name-shade) |
| Utility classes | bg-brand-500, text-brand-700, etc. | Same class names. Variables resolve at build time |
| Typical workflow | Edit JS config, restart dev server | Paste @theme block into CSS, hot reload styles |
A v3 snippet looks like module.exports = { theme: { extend: { colors: { brand: { 500: "#3B82F6" } } } } } }. A v4 snippet looks like @theme { --color-brand-500: #3B82F6; }. Both describe the same semantic token. Choose the export that matches your project's Tailwind major version.
When upgrading from v3 to v4, paste the generated @theme block into your entry CSS file rather than translating tokens manually. Because this tool emits all eleven stops in both formats from one source hex, you avoid drift where the JavaScript config and CSS variables slowly disagree after design tweaks.
If your codebase still mixes legacy @apply rules with utility classes, either format works as long as the underlying token names match. The v4 path aligns with Tailwind's long-term direction toward CSS-native design tokens, while v3 remains appropriate for established apps that have not yet adopted the new configuration model.
Download buttons save tailwind.config.js and theme.css with sensible filenames so you can drop them into a scratch directory, diff against an existing config, and merge only the colors block without overwriting unrelated theme settings such as spacing or font families.
The generator is built for designers and developers who need production-ready Tailwind tokens without leaving the browser. Key capabilities include:
Under the hood, the palette algorithm converts your hex to HSL, shifts a standard Tailwind-like lightness curve so the pinned stop aligns with your color, and applies gentle saturation tapering at the lightest and darkest extremes. You see the outcome immediately in the swatch grid rather than guessing how a spreadsheet formula might behave on your particular brand hue.
TestMu AI (formerly LambdaTest) maintains this utility as part of a growing library of free developer tools focused on privacy, speed, and practical output you can ship the same day. The generator complements visual design workflows: pick a color in the browser, export tokens, and drop them into Storybook or your app shell without a separate desktop app.
Random color sampling helps when you are exploring direction before brand sign-off, while the pin control gives precision once a stakeholder supplies the final hex. Together those inputs cover both discovery and production phases of a typical design-system rollout.
Custom Tailwind palettes show up across modern front-end workflows. Common scenarios where this generator saves time include:
E-commerce themes often need a distinctive accent while keeping neutral grays from Tailwind's stone or gray families. Generate brand or sale colors here, leave structural neutrals untouched, and compose classes like bg-stone-100 with text-brand-700 for promotional banners without conflicting token namespaces.
Pair this tool with related utilities: map existing classes with the Hex to Tailwind converter, reverse lookup with Tailwind to Hex, migrate legacy CSS with CSS to Tailwind, explore general shade ramps in the Colour Shades Generator, and verify contrast with the Color Contrast Checker.
Agency developers often generate a client palette during kickoff, commit the config to a monorepo, and share swatch hex values with QA so visual regression tests can assert the correct shades on buttons and alerts. Startups use the same workflow to avoid paying for proprietary palette plugins during early product iterations.
Accessibility-minded teams should still run contrast checks on text and interactive combinations even when the ramp looks balanced visually. A well-spaced scale makes it easier to pick compliant pairs, for example brand-700 text on brand-50 backgrounds, but WCAG thresholds depend on final usage, not generation alone.
Marketing sites, SaaS dashboards, and mobile-first apps all benefit from the same export format even when their visual language differs. Because output is plain text config rather than a proprietary file, you can version it in Git, review changes in pull requests, and roll back a palette tweak as easily as any other code change.
Below are answers to common questions about custom Tailwind palettes, shade numbering, and how this browser-based generator handles your color data.
In Tailwind v3, paste the generated theme.extend.colors block into tailwind.config.js under theme.extend.colors. In v4, add the @theme CSS variables to your main stylesheet. Use classes like bg-brand-500 or text-brand-700 immediately after rebuilding.
Tailwind shade numbers describe lightness steps, not opacity. Lower numbers like 50 and 100 are very light tints for backgrounds. Mid stops like 500 suit primary accents. Higher numbers like 800 and 950 are deep shades for text and dark UI surfaces.
The tool converts your hex to HSL, anchors your exact color at the pinned shade, and interpolates lightness along Tailwind's standard curve while holding hue steady. Saturation tapers slightly at the lightest and darkest stops so extreme shades stay balanced.
Yes. The tool exports a tailwind.config.js snippet for v3's theme.extend.colors and a CSS @theme block with --color-* variables for v4. Copy whichever matches your project setup. Both describe the same eleven-shade scale.
No. Custom colors extend the palette under your chosen name such as brand. Default colors like blue, gray, and red remain available. You only override a built-in name if you reuse an existing key, which this tool avoids.
Pin light pastels to 200 or 300 so the generator keeps softer tints in the lighter half of the scale and builds usable darker steps for buttons and text. Very dark brand colors work best pinned to 600 or 700.
The generator reduces saturation by fifteen percent at shades 50, 100, 900, and 950 on purpose. Extreme lightness steps can look harsh at full saturation. Tapering keeps backgrounds airy and deep shades readable without neon edges.
No. Palette generation runs entirely in your browser. Your hex values and palette name never leave your device, which makes the tool safe for unreleased brand colors or client work you cannot upload to third-party services.
Did you find this page helpful?
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance