Skip to content

Tailwind Color Finder

Find the closest Tailwind CSS color class for any HEX or RGB color. Free Tailwind color matcher with visual comparison and copy-ready class names.

CSS ToolsColor Tools
Instant results

Enter a HEX color or use the color picker

Best MatchDistance: 0.0
Input
Match
blue-500
#3B82F6
Exact match found!
blue-600#2563EB
39.6
indigo-500#6366F1
49.1
blue-400#60A5FA
51.1
sky-500#0EA5E9
58.5

About Tailwind Color Finder

Find the closest Tailwind CSS color to any HEX value. Uses Euclidean RGB distance to search all 22 color families across 11 shades (50-950) from the Tailwind v3 palette. Shows the top 5 closest matches with side-by-side color comparison.

How to Use Tailwind Color Finder

1

Enter hex or RGB

Type color value (e.g., #3B82F6). Tool processes immediately.

2

View Tailwind class

Tool shows: matching Tailwind utility (bg-blue-500). Or closest approximation if no exact match.

3

Try reverse lookup

Or enter Tailwind class; tool shows: corresponding hex/RGB. Bidirectional.

4

Use in code

Apply the Tailwind class in your HTML or JSX, replacing ad-hoc hex codes with standardized utilities for cleaner, more consistent code.

When to Use Tailwind Color Finder

Mapping a hex value to its Tailwind class

You see #3B82F6 in a design mockup and need to know which utility class delivers it. Drop the hex in and the tool returns bg-blue-500 if it matches, or the closest neighbor if the value lands between standard shades. Designers and developers stop guessing and start coding.

Migrating away from ad-hoc CSS

Older codebases tend to accumulate hex codes in stylesheets that nobody documented. As you port to Tailwind, this lookup tells you which existing values already match the standard palette and which ones need a custom theme entry. The latter list usually surprises people by being short.

Going the other direction

Sometimes you need the hex behind a class name, like when pasting Tailwind colors into a design tool that doesn't speak utility classes. Type bg-emerald-500 and you get the corresponding hex and RGB values for use in Figma, Sketch, or wherever your designer prefers.

Learning the palette by browsing it

Tailwind's color system has structure worth understanding. Browsing all 22 hue families and their 11 shades side by side helps you build intuition about which neighbors work well together and which combinations clash before you commit to them in code.

Tailwind Color Finder Examples

Hex with an exact Tailwind match

Input
#3B82F6
Output
bg-blue-500 (exact match)

This particular blue is one of Tailwind's defaults, so the lookup returns the precise utility class. Most well-designed mockups end up using palette colors anyway, which is why exact matches are common.

A darker shade in the same family

Input
#1E40AF
Output
Closest: blue-800 (#1E40AF), exact match

Even values that look like custom picks often turn out to live in the standard palette. The tool confirms exact matches and otherwise reports the nearest neighbor with a similarity score.

A genuine outlier

Input
#FF0099 (custom magenta)
Output
Closest: pink-500 (#EC4899), not exact, suggesting either a config extension or sticking with the custom value

Vivid brand colors often fall between Tailwind's curated shades. The honest recommendation is to add the brand color to your tailwind.config.js theme rather than approximate it with something close-but-wrong.

Tips & Best Practices for Tailwind Color Finder

  • 1.The default 22-color, 11-shade palette gives you 242 hand-picked options. Most projects never need to extend it, since the defaults already cover the common ground for UI work.
  • 2.When you do extend, add only the brand colors you actually need. A bloated config file becomes its own problem because the team has to remember which custom shades exist alongside defaults.
  • 3.Semantic aliases like primary, success, and danger are worth defining once instead of scattering red-500 references across components. Refactoring later means changing one config entry rather than a hundred class strings.
  • 4.Legacy migration is the killer use case. Walk through the existing stylesheet, look up each color, and you end up with a tidy mapping that turns chaotic ad-hoc CSS into a coherent token-based system.
  • 5.A perfect color match still doesn't guarantee accessibility. Pair this lookup with a contrast checker before shipping production code, since two valid Tailwind colors can still fail WCAG when used together.
  • 6.Palettes have evolved between Tailwind versions. Confirm the tool targets the same version you're using, otherwise the matches will look right in lookups but produce subtly different colors in your build.

Frequently Asked Questions

A standardized set of colors built into the Tailwind CSS framework — 22 color families with 11 shades each (50-900 plus 950) for a total of 242 carefully chosen colors. Every shade is optimized for web design and accessibility, and the palette has been the framework standard since Tailwind v2.