InputTestHub

Tailwind Colour Converter

Finds the nearest Tailwind colour class for any hex value, and shows the hex for any Tailwind class.

Colour & Design Nothing uploaded No sign-up Free, unlimited
Colour & Design tool
Pick a colour to see every value.
In short Tailwind's palette is a fixed set of colours at eleven steps from 50 to 950, and this finds the closest class to any hex value — or the exact hex behind any class. The important word is closest. Unless your colour happens to be one of Tailwind's, the match is an approximation, and it is worth looking at how far off it is before using it: a nearly-right brand colour is a brand colour that fails a comparison against the real thing. If the distance is meaningful, extend the theme with your own colour rather than accepting the nearest neighbour. Going the other way — class to hex — is exact and is the more common need: you have a mockup built on `slate-800` and need the value for a chart library, an email template or a native app that does not know what Tailwind is. Worth knowing about the ramps themselves: Tailwind's steps are tuned so that consecutive values look evenly spaced rather than being evenly spaced numerically, and the numbering is designed so that a colour and its 500 step have similar contrast behaviour across hues. That is why swapping `blue-600` for `emerald-600` usually keeps a design working while swapping arbitrary hexes does not.

How to use the Tailwind Colour Converter

  1. Pick a colour with the picker or paste a HEX, RGB or HSL value.
  2. Every other format and the generated variations update instantly.
  3. Click any value or swatch to copy it.

About the Tailwind Colour Converter

The Tailwind Colour Converter finds the nearest Tailwind colour class for any hex value, and shows the hex for any Tailwind class. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Matching a brand colour to the closest Tailwind class.
  • Finding the hex behind a class name.
  • Deciding whether to extend the theme or use a default.

Frequently asked questions

Is the Tailwind Colour Converter free, or is there a paid tier?
It is free, with no account, no trial and no daily cap. Every colour & design tool on inputtesthub.com works the same way: open the page and use it.
Can you see what I put into this page?
No. The Tailwind Colour Converter runs entirely in your browser using JavaScript. Your input never reaches inputtesthub.com or any third party — open your browser's Network tab while you use it and you will see no request go out.
When would I actually need the Tailwind Colour Converter?
The most common reasons people reach for it: matching a brand colour to the closest Tailwind class. Finding the hex behind a class name. Deciding whether to extend the theme or use a default. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
Does the Tailwind Colour Converter work on a phone?
Yes. The page is responsive and the page works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related colour & design tools

All 33
01

Colour Code Converter

Converts colours between HEX, RGB, RGBA, HSL, HSLA, HSV, CMYK, LAB and named CSS colours.

02

Colour Picker

Picks any colour and shows its HEX, RGB, HSL, HSV, CMYK and LAB values, plus tints, shades and…

03

HEX to RGB Converter

Converts HEX colour codes to RGB and RGBA values, handling 3, 4, 6 and 8 digit hex.

04

RGB to HEX Converter

Converts RGB and RGBA values into HEX colour codes, including 8-digit hex with alpha.

05

HSL Colour Converter

Converts between HSL, HEX and RGB, so you can adjust lightness and saturation predictably.

06

CMYK Colour Converter

Converts between CMYK and RGB or HEX for print work, with a note on gamut differences.

09

Colour Contrast Checker

Calculates WCAG contrast ratio between two colours and reports AA and AAA pass or fail for…