Skip to main content

HEX to Tailwind Converter

Find the closest Tailwind CSS color for any HEX code.
Enter a color and get matching Tailwind classes.

Your Color
Closest Match
Exact Match Found!
This is a standard Tailwind color
blue-500
#3b82f6
blue-600
#2563eb
indigo-500
#6366f1
blue-400
#60a5fa
sky-500
#0ea5e9
indigo-400
#818cf8
Usage Examples
bg-blue-500
text-blue-500
border-blue-500
ring-blue-500

About HEX to Tailwind

This tool finds the closest matching Tailwind CSS color class for any HEX color code. It compares against all 220+ colors in Tailwind's default palette.

If your color isn't an exact match, you can use Tailwind's arbitrary value syntax: bg-[#3b82f6]

The matching algorithm uses weighted color distance that accounts for how the human eye perceives color differences.