How to Find Tailwind CSS Colors
When working with Tailwind CSS, you often have a specific hex color from a design file and need to find the closest Tailwind utility class. Our Tailwind color finder does this instantly, comparing your color against every shade in the Tailwind palette.
Step 1: Enter your color. Type a hex color code or use the color picker. The tool accepts any valid hex color with or without the # prefix.
Step 2: See the closest match. The tool instantly finds the Tailwind color that most closely matches your input. It shows the Tailwind class name, the matched hex value, and a visual comparison between your color and the match.
Step 3: Copy and use. Click any color in the palette or the matched result to copy the class name. Use it directly in your Tailwind CSS markup like bg-blue-500, text-red-600, or border-green-400.
The Tailwind CSS Color System
Tailwind CSS includes a carefully crafted color palette with 22 color families, each containing 11 shades from 50 (lightest) to 950 (darkest). The palette was designed by the Tailwind team to provide perceptually uniform steps between shades, ensuring consistent visual hierarchy and sufficient contrast between adjacent shades.
The palette includes both warm neutrals (stone, neutral) and cool neutrals (slate, gray, zinc), giving designers flexibility for different design aesthetics. The chromatic colors span the full spectrum from reds through purples, each optimized for accessibility and visual harmony when used together in a design.
Using Tailwind Colors Effectively
Semantic color mapping. Map Tailwind colors to semantic roles in your design: a primary color (e.g., blue-600), secondary (e.g., violet-500), success (green-500), warning (amber-500), and danger (red-500). Use Tailwind config to create custom color aliases that reference these palette colors.
Contrast and accessibility. When pairing Tailwind colors for text and background, ensure sufficient contrast. Generally, pairing a 50-100 shade background with 700-900 shade text (or vice versa) meets WCAG AA contrast requirements. Use the Chroma Creator contrast checker to verify specific combinations.
Dark mode considerations. Tailwind makes dark mode straightforward with the dark: variant. A common pattern is using lighter shades for dark mode backgrounds (e.g., dark:bg-gray-800) and darker shades for light mode backgrounds (bg-white). Keep your color choices consistent by always using palette colors rather than arbitrary hex values.