Color Converter + Palette

Tailwind CSS Color to HEX: Color Lookup

Look up Tailwind CSS color names and get their HEX values. blue-500 is #3b82f6, gray-900 is #111827. Quick reference for Tailwind color palette.

100% client-side. Your data never leaves your browser.

#3b82f6
R
G
B
Formats
HEX#3b82f6
RGBrgb(59, 130, 246)
HSLhsl(217, 91%, 60%)
HSBhsb(217, 76%, 96%)
CMYKcmyk(76%, 47%, 0%, 4%)
WCAG Contrast
3.68:1AA Large
5.71:1AA
Palette
Send to:

Related Tools

Tailwind CSS Color to HEX Lookup

blue-500 is #3b82f6, which is rgb(59, 130, 246). Tailwind’s color system uses a fixed palette of named colors with numbered shades from 50 to 950. Each shade maps to a specific hex value that is consistent across Tailwind versions within the same major version.

The Color Scale Structure

Every Tailwind color family uses the same numeric scale. The numbers represent lightness in a roughly linear progression:

ShadeTypical use
50Very light backgrounds, hover tints
100Light backgrounds, selected states
200Borders, dividers
300Disabled states, placeholder text
400Secondary text, icons
500Pure hue, interactive elements
600Hover states for 500 elements
700Text on light backgrounds
800Heading text
900High contrast text
950Near-black, added in Tailwind v3.3

Commonly Used Colors with HEX Values

A reference for the shades used most often in practice:

Tailwind nameHEXRGB
blue-50#eff6ffrgb(239, 246, 255)
blue-100#dbeafergb(219, 234, 254)
blue-500#3b82f6rgb(59, 130, 246)
blue-600#2563ebrgb(37, 99, 235)
blue-700#1d4ed8rgb(29, 78, 216)
blue-900#1e3a8argb(30, 58, 138)
slate-900#0f172argb(15, 23, 42)
gray-900#111827rgb(17, 24, 39)
zinc-900#18181brgb(24, 24, 27)
neutral-900#171717rgb(23, 23, 23)
stone-900#1c1917rgb(28, 25, 23)
red-500#ef4444rgb(239, 68, 68)
green-500#22c55ergb(34, 197, 94)
yellow-500#eab308rgb(234, 179, 8)
purple-500#a855f7rgb(168, 85, 247)
pink-500#ec4899rgb(236, 72, 153)
white#ffffffrgb(255, 255, 255)
black#000000rgb(0, 0, 0)

The Gray Families Compared

Tailwind ships with five gray families. The differences matter most at darker shades:

Name900 valueUndertone
slate#0f172aStrong blue
gray#111827Slight blue
zinc#18181bNeutral
neutral#171717True neutral
stone#1c1917Warm brown

For dark mode backgrounds, zinc and neutral are popular because they avoid the blue cast that makes slate and gray look cold on some displays. Stone is useful for warm-toned UIs.

Custom Colors in tailwind.config.js

To extend the palette without replacing it:

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        brand: {
          50:  '#eff6ff',
          100: '#dbeafe',
          500: '#3b82f6',
          600: '#2563eb',
          900: '#1e3a8a',
        },
      },
    },
  },
}

This adds bg-brand-500, text-brand-600, border-brand-100, and all the other utility variants automatically.

To replace the entire palette (remove all defaults):

module.exports = {
  theme: {
    colors: {
      // only your colors here
    },
  },
}

This is useful when a design system has strict color governance and the default Tailwind palette should not be available.

Tailwind v4 and CSS Custom Properties

Tailwind v4 moves configuration from tailwind.config.js to CSS using the @theme directive:

@import "tailwindcss";

@theme {
  --color-brand-50: #eff6ff;
  --color-brand-500: #3b82f6;
  --color-brand-900: #1e3a8a;
}

Every color in @theme automatically generates utility classes. The CSS variable names follow the pattern --color-{name}-{shade}.

All default Tailwind colors are also exposed as CSS custom properties, so you can use them in arbitrary CSS:

.custom-element {
  background: var(--color-blue-500);
  border-color: var(--color-blue-200);
}

This removes the need for the resolveConfig workaround that was common in v3 for accessing palette values outside of Tailwind utilities.

Accessing Palette Values in JavaScript

In Tailwind v3, use resolveConfig to get hex values at runtime:

import resolveConfig from 'tailwindcss/resolveConfig';
import tailwindConfig from './tailwind.config.js';

const config = resolveConfig(tailwindConfig);
const blue500 = config.theme.colors.blue[500]; // '#3b82f6'

In Tailwind v4, read CSS custom properties from the computed style instead:

const blue500 = getComputedStyle(document.documentElement)
  .getPropertyValue('--color-blue-500')
  .trim(); // '#3b82f6'

This is useful for canvas rendering, charting libraries, or any context where you need a color value as a string but want it to stay in sync with your design tokens.