🔄 Tailwind Color to HEX Converter

Convert Tailwind CSS color classes to HEX, RGB, and HSL values instantly - supports all Tailwind color tokens

Enter a Tailwind color class like slate-500, red-600, blue-100, etc.
Show additional opacity variants (50%, 75%, 90%) for the color

Your Result:

🔄 TAILWIND → HEX

slate-500 → Complete Color Information

HEX • RGB • HSL values

🎨 Input: slate-500

Tailwind: slate-500
Example preview color swatch
🔢

HEX

#64748b

Hexadecimal

🌈

RGB

100, 116, 139

Red Green Blue

🎨

HSL

215°, 16%, 47%

Hue Saturation Light

💻 CSS Usage Example

/* Tailwind Class */
.bg-slate-500 { background-color: #64748b; }
/* Direct CSS */
background-color: #64748b;
color: rgb(100, 116, 139);

How to Use This Tailwind Color to HEX Converter

Converting Tailwind color classes to standard color formats is straightforward with this tool. Simply enter any Tailwind color class and get instant HEX, RGB, and HSL values.

  1. Enter Color Class: Type any Tailwind color class like "blue-500", "slate-200", or "red-700" into the input field.
  2. View Results: The tool instantly displays the HEX code, RGB values, and HSL values for your color.
  3. Copy Values: Click the copy button to copy any format to your clipboard for immediate use in your projects.
  4. Optional Features: Enable "Include opacity variants" to see common transparency levels applied to your color.

The tool supports all Tailwind color names (slate, gray, red, blue, green, etc.) with all shade levels (50 through 950). This covers hundreds of pre-defined colors from Tailwind's comprehensive palette.

Pro Tip: Use this tool when creating design systems, documentation, or when you need to use Tailwind colors outside of Tailwind CSS projects. The HEX values are perfect for CSS variables, and RGB values work great for JavaScript color manipulation.

How It Works

This tool uses Tailwind CSS's official color palette to provide accurate color conversions:

  • Color Recognition: The tool parses your input to identify valid Tailwind color classes and shade levels.
  • Palette Lookup: It references Tailwind's complete color palette database containing hundreds of predefined colors.
  • Format Conversion: The base HEX values are converted to RGB and HSL formats using standard color space mathematics.
  • Visual Preview: A color swatch shows you exactly what the color looks like alongside the numerical values.
  • CSS Examples: The tool provides ready-to-use CSS code snippets showing how to use each color format.

All conversions are mathematically precise and match Tailwind's actual CSS output exactly. The tool handles the complete Tailwind color spectrum including all 22 color families and 11 shade levels per family.

The opacity variants feature calculates common transparency levels (50%, 75%, 90%) by applying alpha channel modifications to the base color values, giving you ready-to-use RGBA and HSLA formats.

When You Might Need This

Frequently Asked Questions

What Tailwind color formats does this tool support?

This tool supports all standard Tailwind color classes including the full color palette (slate, gray, zinc, neutral, stone, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose) with all shade levels (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950). Simply enter the class name like 'blue-500' or 'slate-200' to get the corresponding HEX, RGB, and HSL values.

Can I convert custom Tailwind colors or only the default palette?

This tool currently supports Tailwind's default color palette. For custom colors defined in your tailwind.config.js file, you would need to look up those values directly in your configuration. The tool covers all built-in Tailwind colors which represent the vast majority of use cases in most projects.

What's the difference between the HEX, RGB, and HSL formats?

HEX is a hexadecimal representation perfect for CSS and web development. RGB shows red, green, and blue values (0-255) useful for programmatic color manipulation. HSL displays hue (0-360°), saturation (0-100%), and lightness (0-100%) which is intuitive for designers making color adjustments. All three represent the same color in different formats for different use cases.

Does the tool handle Tailwind opacity modifiers like bg-blue-500/75?

The base tool focuses on solid color conversions from classes like 'blue-500'. For opacity variants, you can use the 'Include opacity variants' option which will show common opacity levels (50%, 75%, 90%) applied to your color. For specific opacity modifiers in Tailwind syntax, you'll get the base color and can apply the opacity percentage manually.

How accurate are the color conversions compared to Tailwind's actual CSS output?

The conversions are completely accurate as they use the exact same color values that Tailwind CSS uses internally. The tool references Tailwind's official color palette definitions, ensuring 100% consistency with what you'll see when using these colors in your Tailwind projects. This makes it perfect for creating design documentation or using colors in non-Tailwind contexts.