HEX rounds to 8-bit sRGB. Wide-gamut or fractional source values may change; original/CSS output preserves those source values.
Merge the theme snippet into your project. Use complete class names in source files so Tailwind can detect them. JSON is a plain color map, not a design-token specification.
Use the exact color or find a default
These are different tasks. The nearest default is optional and never replaces your source color.
Keep the exact color
bg-[#336699]
Use your custom theme
bg-brand-600
Nearest defaults
sky-700
bg-sky-700
ΔEOK · Euclidean OKLab distance: 0.038555
cyan-700
bg-cyan-700
ΔEOK · Euclidean OKLab distance: 0.052694
sky-800
bg-sky-800
ΔEOK · Euclidean OKLab distance: 0.060054
Distances compare original OKLab coordinates, not the mapped preview. A small distance is not a guarantee of an invisible difference.
Color calculations run in your browser. The site also loads assets, advertising and analytics.
Build a scale with clear choices
A brand color and a nearest default solve different problems.
Keep the color that makes it your brand
Automatic positioning uses the source color’s OKLCH lightness to choose a step; a fixed position lets you decide. The original value is retained at that step while the surrounding shades change. Lightness distribution and derived chroma controls refine the scale without quietly repainting your source.
Export a palette, not disconnected snippets
CSS variables, SCSS variables and map, Tailwind v4 @theme, v3 configuration and plain JSON all draw from the same shade data. Choose preserved originals plus OKLCH, or explicitly choose rounded sRGB HEX. The optional nearest-default panel uses versioned official palettes and shows its distance method.
How to make a Tailwind color palette
Start with the source, then review the scale in context.
01
Enter an opaque source and choose its position
Paste a supported color, select automatic placement or a fixed 50–950 step and give the palette a valid name. Alpha is rejected rather than removed. Very light or dark colors at an extreme fixed position can produce repeated shades.
02
Adjust derived shades and compare a pair
Change lightness spacing or derived chroma while the anchor stays unchanged. Derived out-of-gamut colors reduce chroma in OKLCH. Select actual foreground and background shades in the preview and send the pair to the contrast checker.
03
Choose a version and copy useful code
Use @theme after your Tailwind v4 import, or merge the v3 theme.extend.colors object into your config. The nearest-default version selector affects matching data, not your generated scale. Keep complete utility names in source; browser support for OKLCH is separate from Tailwind version support.
Keep working with color
Build a scale, explore a combination or check a real pair.
Color palette generator
Generate a five-color palette from a reference color. Explore six harmonies, lock individual colors, regenerate, undo and export CSS, SCSS, Tailwind or JSON.
Original colors, shade positions, matching and exports.
Can I keep my exact brand color in Tailwind?
Yes. Use the arbitrary-value utility shown by the tool, or define a custom theme color. The original/CSS export preserves the source at its anchor. Choosing HEX may introduce sRGB mapping or 8-bit rounding; matching a built-in color is an optional approximation.
Where do Tailwind v4 and v3 exports go?
Put the v4 @theme snippet in your stylesheet after @import "tailwindcss". For v3, merge theme.extend.colors into your configuration; the download uses an ES-module .mjs file. Copy the complete classes into scanned source files. Existing project setup is still required.
Why is my original color at 600 instead of 500?
Automatic placement picks the reference step closest to its OKLCH lightness. The source is not changed to fit 500. You can choose a fixed step and the tool rebuilds surrounding shades while preserving the source value.
Is the generated scale an official Tailwind palette?
No. It is a custom scale generated from your color. Only the nearest-default panel uses the official snapshots, labeled Tailwind CSS 4.3.3 or 3.4.17. Generated shades are not claimed to reproduce Tailwind’s palette design process.
How is the nearest Tailwind color chosen?
The tool compares Euclidean distance in OKLab (ΔEOK) across the selected official palette and shows three nearest candidates. Alpha is not accepted. Distances use original coordinates while previews are mapped to sRGB, so the score is not a promise about an actual display.
Do I have to convert HEX to OKLCH for Tailwind v4?
No. Tailwind theme colors can use HEX and other supported CSS colors. OKLCH is useful here for generating lightness and chroma changes. Preserve the original/CSS values, or choose HEX deliberately when you want an sRGB output.
Why do some shades have less chroma or repeat?
Derived colors reduce chroma to fit sRGB while retaining target lightness and hue. The original is kept even when outside sRGB, with a preview warning. Near black or white, especially with a forced extreme anchor, there may be insufficient lightness range for distinct steps.
Does a complete scale guarantee accessible UI colors?
No. Shade numbers and color harmony do not establish contrast. Choose the actual text/background pair and check the ratio, then assess font size, states and context. The preview’s chip label contrast does not certify the whole palette.