Skip to content
ZeroServer.tools

Color to Tailwind

Find the nearest Tailwind CSS color class for any hex color — instant match across the full v3 palette.

Best match:cyan-400
#SwatchClassHexDistance
1
cyan-400#22d3ee0.0
2
sky-400#38bdf832.7
3
cyan-500#06b6d448.0
4
teal-400#2dd4bf48.3
5
sky-500#0ea5e950.4

How does Tailwind color matching work?

Each Tailwind color class maps to a specific hex value. This tool finds the closest match by calculating the Euclidean distance in RGB space between your input color and every entry in the Tailwind v3 palette. The result gives you the class name you can use directly in your HTML (e.g. bg-sky-500, text-teal-400). A distance of 0 means an exact match. The top 5 matches are shown so you can pick the shade that looks best in context. All processing happens in your browser.

Private & free — this tool runs entirely in your browser.

Recommended: Kinsta Fast managed hosting — up to $500 + 10% recurring.affiliate

Related Design & CSS tools