Tailwind color to HEX
Convert a Tailwind color to HEX, free and online. Type a name like sky-500 or a whole class like bg-rose-300 and get the HEX code from the Tailwind 4 or Tailwind 3 default palette. Useful for Figma, emails, charts or anywhere Tailwind classes don't reach.
How to get the HEX code of a Tailwind color
- 1Pick Tailwind 4 or Tailwind 3 under "Tailwind version"
- 2Type a color such as sky-500 or bg-rose-300 into "Color"
- 3Copy the HEX code from the big line
- The HEX code, such as #00A6F4 for sky-500 in Tailwind 4
Before you copy
- Paste the class as it is.bg-, text-, border- and the like, hover: and md:, and /50 are all stripped off
- Version 4 or 3.The two palettes differ: sky-500 is #00A6F4 in Tailwind 4 and #0EA5E9 in Tailwind 3
- Nothing is sent anywhere.The palettes are part of the page and the lookup runs in your browser
What you can do
- Look up any default Tailwind color: 22 palettes from slate to rose, steps 50 to 950
- Type it the way it sits in your markup: sky-500, bg-sky-500, hover:text-sky-500/50 or sky 500
- Switch between Tailwind 4 and Tailwind 3 and see the HEX code change at once
- Copy rgb(), hsl() or oklch() of the same color from the list. For Tailwind 4 the OKLCH line shows the value as Tailwind defines it
- Get a clear message for a name that does not exist, such as sky-550
Good to know
- Tailwind 4 defines its colors in OKLCH, and many of them, such as amber-400 and sky-500, lie outside sRGB. HEX then shows the nearest sRGB color and the page says so
- For an exact Tailwind 4 color in CSS, copy the oklch() line rather than the HEX code
- Opacity such as /50 is ignored, because a HEX code here has no transparency
- Only the default palette is known, from Tailwind 4.1.11 and 3.4.17. Custom theme colors and black and white are not in it
Questions
What is the HEX code of a Tailwind color?
Type the name, for example blue-600, and choose your version. In Tailwind 3 blue-600 is #2563EB, in Tailwind 4 it is #155DFC.
Why does Tailwind 4 give a different HEX code than Tailwind 3?
Tailwind 4 redefined its palette in OKLCH with more vivid colors. Many of them go beyond what HEX can hold, so the HEX code is the closest sRGB match, not the exact color.
Can I paste a full class like hover:bg-sky-500/75?
Yes. Variants like hover: and md:, the utility like bg- or text-, and the opacity after the slash are left out. Only the color name and step are read.
Does it know my custom colors?
No. The page knows the default palettes of Tailwind 4 and 3 only. A name from your own theme, like brand-500, gets the message that no Tailwind color has that name.
More tools in Web & code
That page doesn't exist. Search or drop a file below to find the tool you need.
One site for every file job. What’s yours?
Stop hopping between converter sites. Pick from 410+ tools, or a recipe that chains several.
- Files Stay On Your Device
- No watermark
- Works offline
Drop a file here
A pasted file works too.
or search for a tool
Open an app
From “ugh, this file” to done, in three steps.
- Drop it, or pick a task
No file? Search for what you need. Files are processed on your device, not uploaded for processing.
- Pick what you want
Smaller, another format, signed, merged. One click, no settings to study first.
- Make it a recipe
Need three steps in a row every week? Chain them once and run the same recipe next time.
One approved toolbox for the whole team.
In offices, on building sites and in agencies, teams handle sensitive files all day. ToolRecipe gives everyone the same tools and the same recipes, and the files are processed on each person's own computer.
- Files are processed on the employee's device
- Company recipes everyone runs the same way
- One place instead of ten converter sites