Tailwind CSS Color Palette Generator

Generate perfect Tailwind CSS color palettes from any hex code.
Using chroma-js with LCH color space for perceptually smooth gradients.

Choose Base Color

Click to choose color

Tailwind Config

colors: {
  brand: {
    50: '#fdfbf7',
    100: '#fcddcb',
    200: '#ffb9b6',
    300: '#f496bf',
    400: '#c483dc',
    500: '#3b82f6',
    600: '#3767c0',
    700: '#304e8d',
    800: '#26365e',
    900: '#1a1f32',
    950: '#050505',
  }
}

How to use:

  1. Copy the config code above
  2. Open your tailwind.config.js file
  3. Paste the code into theme.extend
  4. Use in your code:bg-brand-500,text-brand-700 etc.

调色板Preview

Click any color to copy its code

How to Use Tailwind Colors

Tailwind CSS revolutionized web development with its utility-first approach, and its color system is no exception. Understanding how to effectively use Tailwind colors can dramatically improve your design workflow and create more consistent, accessible interfaces.

Understanding the Color Scale System

Tailwind uses a numeric scale from 50 to 950, where 50 represents the lightest shade and 950 the darkest. This systematic approach ensures consistency across your entire design. The middle value (500) typically represents your base color, making it easy to create harmonious color schemes.

Each shade serves a specific purpose: lighter shades (50-200) work well for backgrounds and subtle accents, mid-range shades (300-500) are perfect for interactive elements like buttons, and darker shades (600-950) provide excellent contrast for text and important UI elements.

Implementing Custom Colors

To add custom colors to your Tailwind project, simply copy the generated configuration from our tool and paste it into your tailwind.config.js file under theme.extend.colors. This preserves Tailwind's default colors while adding your custom palette.

module.exports = {
  theme: {
    extend: {
      colors: {
        brand: {
          50: '#f0f9ff',
          100: '#e0f2fe',
          // ... your generated colors
          900: '#0c4a6e',
          950: '#082f49',
        }
      }
    }
  }
}

Once configured, you can use your custom colors throughout your project with utility classes likebg-brand-500,text-brand-700, orborder-brand-200. This approach maintains consistency while giving you complete control over your color palette.

Our generator uses the LCH color space, which ensures that each shade in your palette has perceptually uniform brightness. This means your color transitions will look natural and professional, avoiding the common pitfall of uneven color scales that can make designs feel inconsistent or jarring.

Features & Quick Guide

What is a Tailwind Palette?

Tailwind CSS uses a numeric color scale system (50-950) where each color has 11 different shades. This systematic approach allows you to create consistent and beautiful color schemes effortlessly.

Shade Guidelines

  • 50-200: Light shades for backgrounds and borders
  • 300-500: Medium shades for buttons and accents
  • 600-950: Dark shades for text and dark backgrounds

How to Use Generated Palette

  1. Copy the generated configuration code
  2. Open your tailwind.config.js
  3. Paste into theme.extend.colors
  4. Use classes like:bg-brand-500

Technical Features

  • Precise color calculation with chroma-js
  • LCH color space for uniform transitions
  • Smart text contrast (WCAG compliant)
  • One-click copy for colors and config