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.
Enter a HEX color or use the color picker
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
Enter hex or RGB
Type color value (e.g., #3B82F6). Tool processes immediately.
View Tailwind class
Tool shows: matching Tailwind utility (bg-blue-500). Or closest approximation if no exact match.
Try reverse lookup
Or enter Tailwind class; tool shows: corresponding hex/RGB. Bidirectional.
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
#3B82F6bg-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
#1E40AFClosest: blue-800 (#1E40AF), exact matchEven 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
#FF0099 (custom magenta)Closest: pink-500 (#EC4899), not exact, suggesting either a config extension or sticking with the custom valueVivid 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
Related Tools
CSS Gradient Generator
Create CSS gradients visually online with a drag-and-drop editor. Free gradient generator with linear, radial options and CSS output.
Accessible Color Generator
Auto-generate WCAG AA and AAA compliant color combinations. Find accessible text and background color pairs that meet contrast ratios.
CSS Triangle Generator
Generate pure CSS triangles and arrows with customizable size, direction, and color. Free CSS triangle code generator with live preview.
Glassmorphism Generator
Generate glassmorphism CSS effects with adjustable blur, transparency, and border. Free glass UI generator with live preview and copy-ready code.
Neumorphism Generator
Generate neumorphic soft UI box shadows with adjustable depth, blur, and colors. Free neumorphism CSS generator with live preview and code output.
Font Size Calculator
Calculate ideal responsive font sizes based on viewport width and base size. Free font size calculator with px, rem, em conversion and WCAG compliance.