DevKit Market
  • Home
  • Categories
  • Products
  • Tools
  • Claude skills
  • Blog
  • About
Sign inGet started
DevKit Market
HomeCategoriesProductsToolsClaude skillsBlogAbout
Theme
Sign inGet started
DevKit Market

Production-ready starter kits for developers who want to ship faster, not fiddle with boilerplate.

Products

SaaS Starter ProNext.js Blog KitAuth BoilerplateLanding Page KitAdmin DashboardWaitlist App

Company

Hire meBlogClaude skillsAbout

Support

FAQContact

© 2026 DevKit Market. Built solo with Next.js & Claude.

Sitemap
HomeToolsTailwind CSS Color Palette Generator — Custom Color Shades from Any Hex Code

Tailwind CSS Color Palette Generator — Custom Color Shades from Any Hex Code

Enter a brand hex color and instantly generate a full 50–950 shade scale. Copy ready-to-paste config for Tailwind v3 (tailwind.config.js) and v4 (@theme with OKLCH). Free, client-side, zero sign-up.

34 Presets
OKLCH + HEX
WCAG Contrast
6 Export Formats

Base Configuration

RGB

124, 111, 247

HSL

246° 89% 70%

OKLCH (Tailwind v4)

oklch(0.623 0.196 283.45)

Presets (34)

Color Blindness Sim

50100200300400500600700800900950

Saved Workbench (0)

Nothing saved yet

Configure a base color and click "Generate" to start building your palette.

// Add a palette to generate config

Overview

What Is a Tailwind CSS Color Palette Generator?

A free online tool that takes a single hex color code — typically your brand's primary — and produces a complete set of 11 shade variations (50 through 950) formatted specifically for Tailwind CSS. Instead of eyeballing tints and shades by hand, color science algorithms create a perceptually uniform scale that looks consistent across your entire UI.

FreeClient-sideNo sign-upv3 + v4
What it does
11 shades
per palette

One hex. Eleven shades.

Takes your brand's primary hex code and generates a complete 50–950 shade scale using color science algorithms — perceptually uniform, no muddy midtones.

Why you need it
22 built-in
not enough

Tailwind defaults won't cut it.

Tailwind ships 22 built-in color families, but real projects need custom brand colors. A single hex in your config gives you one shade — this tool generates the full scale in seconds.

What it outputs
v3 + v4
both supported

v3 config and v4 OKLCH.

Export a tailwind.config.js snippet for v3, or a @theme CSS block with OKLCH values for v4 — ready to paste, zero reformatting.

Step-by-Step Guide

How to Generate a Custom Tailwind Color Palette

01
01

Enter your brand hex color.

Paste any hex code (e.g., #6d5cff) into the color input or use the color picker. This becomes your 500-level shade — the primary anchor of your palette.

02
02

Preview the generated shade scale.

The tool instantly calculates 11 shades from 50 (lightest) to 950 (darkest), displayed as a visual color strip. Each shade shows its hex value and OKLCH equivalent.

03
03

Adjust the color name.

Choose a semantic name for your color (e.g., brand, primary, indigo) that you'll use in your utility classes like bg-brand-500 or text-primary-700.

04
04

Select your Tailwind version.

Toggle between Tailwind v3 config format (JavaScript object with hex values) and Tailwind v4 format (CSS @theme block with OKLCH values).

05
05

Copy and paste into your project.

Click the copy button and paste the config snippet directly into your tailwind.config.js (v3) or your main CSS file (v4). Your new utility classes are immediately available.

Features

Key Features of This Tailwind Color Generator

Full 50–950 Shade Scale

Core

Enter one color and get all 11 Tailwind shade levels automatically generated. The algorithm maintains perceptual uniformity so each step feels visually consistent — no muddy midtones or washed-out extremes.

Tailwind v4 OKLCH Output

v4

Outputs native OKLCH values ready to paste into a v4 @theme block — something most competing tools still don't support.

Tailwind v3 Config Export

v3

Produces a tailwind.config.js snippet that drops directly into your theme.extend.colors section. No reformatting needed.

Live Visual Preview

UI

See how every shade looks before you copy. The preview strip shows all 11 shades side by side to evaluate contrast, brightness progression, and palette harmony at a glance.

Custom Color Naming

DX

Name your palette anything — brand, accent, ocean. The output uses your name so classes read as bg-brand-500.

Completely Client-Side

Privacy

No server requests, no data storage, no tracking. The entire palette generation happens in your browser using JavaScript. Your color choices never leave your machine.

WCAG Contrast-Aware

A11y

The shade algorithm is designed to produce a scale with sufficient contrast between adjacent steps, making it easier to build accessible interfaces that meet WCAG 2.1 AA guidelines.

One-Click Copy

UX

Copy the full config snippet, an individual shade's hex value, or the OKLCH equivalent with a single click. No highlighting, no manual selection.

Use Cases

When You Need a Custom Tailwind Color Palette

Brand Identity for SaaS Products

Your startup has a brand color specified in your design system. You need all 11 shades to build buttons (500), hover states (600), disabled states (300), backgrounds (50), and focus rings (400). Generate the entire scale from your brand hex and drop it into your config.

Migrating from Tailwind v3 to v4

Tailwind v4 uses OKLCH instead of hex/RGB. If you have custom colors in your v3 config, you'll need OKLCH equivalents. This generator converts your brand hex into the exact OKLCH format that v4's @theme directive expects.

Client Projects with Brand Guidelines

Freelancers and agencies regularly receive brand hex codes from clients. Rather than hacking lighter/darker variants together with opacity tricks, generate a proper shade scale that gives you full control over every element in the UI.

Dark Mode Palette Generation

Dark mode requires inverted shade usage — backgrounds use 900–950 shades while text uses 50–200. Having a complete 11-shade scale ensures smooth light-to-dark mode transitions without custom overrides for every component.

Design System Prototyping

Rapidly prototype multiple palette options — try 5 different primary hex values, compare the generated shade scales side by side, and settle on the one with the best contrast and harmony before writing a single line of code.

Shadcn/ui Theme Customization

Shadcn/ui relies on CSS variables for theming and its default palette uses Tailwind colors. When customizing a shadcn/ui project with brand colors, you need complete shade scales to map onto the component variables.

Reference

Understanding Tailwind CSS Color Shades: What Each Level Is Used For

Every Tailwind color palette consists of 11 shade levels. Each level serves a specific purpose in UI design. Here's how developers typically use each shade:

50–100
Backgrounds & Surfaces

Backgrounds & Surfaces

The lightest shades are used for page backgrounds, card surfaces, and table row alternation. bg-brand-50 creates subtle colored backgrounds without overwhelming the content. In dark mode, these roles are handled by 900–950 instead.

200–300
Borders, Dividers & Disabled States

Borders, Dividers & Disabled States

Mid-light shades work well for borders (border-brand-200), input outlines, dividers, and disabled button backgrounds. Visible enough for contrast while remaining subtle.

400
Placeholder Text & Icons

Placeholder Text & Icons

Placeholder text in inputs, secondary icons, and muted labels typically use the 400 shade. Visible enough to be readable but clearly secondary to the primary content.

500
Primary Buttons & Brand Accents

Primary Buttons & Brand Accents

The 500 shade is your base color — the hex you entered into the generator. Used for primary buttons (bg-brand-500), text links, active indicators, and anywhere your brand color needs to be most prominent.

600–700
Hover States & Focus Rings

Hover States & Focus Rings

Darker than the base, these shades handle interactive states. A primary button might use bg-brand-500 hover:bg-brand-600 for its transition, while focus rings use ring-brand-600 for accessibility feedback.

800–950
Headings, Body Text & Dark Backgrounds

Headings, Body Text & Dark Backgrounds

The darkest shades serve as high-contrast text colors on light backgrounds (text-brand-900) and background colors in dark mode. Shade 950 is nearly black and works well for primary headings and nav backgrounds.

Deep Dive

Tailwind v4 OKLCH Colors — What Changed and Why It Matters

Tailwind CSS v4, released in early 2025, made a significant change to its color system: the entire default palette was migrated from RGB hex values to OKLCH (Oklab Cylindrical) notation. This wasn't a cosmetic change — it fundamentally improves how colors behave in your UI.

What Is OKLCH?

OKLCH stands for Oklab Lightness, Chroma, Hue — a perceptually uniform color space designed by Björn Ottosson in 2020. Equal changes in lightness values produce equal perceived brightness changes, so shade scales actually look evenly spaced.

Why Tailwind v4 Uses OKLCH

OKLCH enables wider-gamut colors on modern displays (P3 and Rec.2020), produces more vibrant saturated hues that hex can't represent, and allows more predictable color manipulation. Tailwind's team described it as "more vivid where sRGB was limited."

How Custom Colors Work in v4

In Tailwind v3, you defined colors in tailwind.config.js using hex values. In v4, you define them using the @theme CSS directive with OKLCH values in your main CSS file.

globals.cssTailwind v4
/* Tailwind v4 — add to your CSS file */
@import "tailwindcss";

@theme {
  --color-brand-50:  oklch(0.98 0.01 250);
  --color-brand-100: oklch(0.95 0.03 250);
  --color-brand-200: oklch(0.90 0.05 250);
  --color-brand-300: oklch(0.82 0.08 250);
  --color-brand-400: oklch(0.73 0.12 250);
  --color-brand-500: oklch(0.63 0.17 250);
  --color-brand-600: oklch(0.53 0.15 250);
  --color-brand-700: oklch(0.43 0.12 250);
  --color-brand-800: oklch(0.33 0.09 250);
  --color-brand-900: oklch(0.23 0.06 250);
  --color-brand-950: oklch(0.15 0.04 250);
}

/* Now use: bg-brand-500, text-brand-900, etc. */

Our generator produces this exact format, saving you from manually calculating OKLCH values for each shade level.

Quick Reference

Adding Your Generated Palette to Tailwind CSS

Copy the snippet for your Tailwind version and paste it directly — no additional configuration needed.

app.cssTailwind v4
@import "tailwindcss";

@theme {
  --color-brand-50:  oklch(0.98 0.01 250);
  --color-brand-100: oklch(0.95 0.03 250);
  --color-brand-500: oklch(0.63 0.17 250);
  --color-brand-900: oklch(0.23 0.06 250);
  --color-brand-950: oklch(0.15 0.04 250);
}

/* Usage: bg-brand-500, text-brand-900, border-brand-200, ring-brand-400 */
tailwind.config.jsTailwind v3
// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        brand: {
          50:  '#f5f3ff',
          100: '#ede9fe',
          200: '#ddd6fe',
          300: '#c4b5fd',
          400: '#a78bfa',
          500: '#8b5cf6',
          600: '#7c3aed',
          700: '#6d28d9',
          800: '#5b21b6',
          900: '#4c1d95',
          950: '#2e1065',
        },
      },
    },
  },
};

// Usage: bg-brand-500, text-brand-900, etc.
index.htmlHTML usage
<!-- Primary button -->
<button class="bg-brand-500 hover:bg-brand-600 text-white
               px-4 py-2 rounded-lg">
  Get Started
</button>

<!-- Card with brand accent -->
<div class="bg-brand-50 border border-brand-200 rounded-xl p-6">
  <h3 class="text-brand-900 font-semibold">Feature Title</h3>
  <p  class="text-brand-700">Description using a darker shade.</p>
</div>

FAQ

Frequently Asked Questions About Tailwind CSS Color Palettes

In Tailwind v4, add custom colors using the @theme directive in your CSS file: @theme { --color-brand-500: oklch(0.55 0.2 250); }. In Tailwind v3, extend the colors object in tailwind.config.js under theme.extend.colors. This generator creates the full config for both versions automatically.

OKLCH is a perceptually uniform color space that produces more consistent and vivid colors compared to hex or HSL. Tailwind CSS v4 switched its entire default palette from RGB to OKLCH to take advantage of wider-gamut displays and more predictable color manipulation. Our generator outputs OKLCH values compatible with Tailwind v4's @theme system.

Every Tailwind CSS color palette includes 11 shade levels: 50 (lightest), 100, 200, 300, 400, 500 (base), 600, 700, 800, 900, and 950 (darkest). The 500 level is typically your brand's primary color, and the other shades are generated algorithmically to ensure visual consistency.

Yes. The generator outputs both formats: a tailwind.config.js snippet with hex values for Tailwind v3, and a CSS @theme block with OKLCH values for Tailwind v4. Copy whichever format matches your project.

No. The entire palette generation happens client-side in your browser. No color data, hex codes, or configurations are transmitted to any server.

Start with your brand's primary hex color as the 500-level shade. The generator will create lighter shades (50–400) for backgrounds, surfaces, and hover states, and darker shades (600–950) for text, active states, and focus rings. For accessible contrast, ensure your text color has a lightness difference of at least 0.4 from your background in OKLCH terms.

Extending (using theme.extend.colors in v3, or just adding new @themevariables in v4) keeps all of Tailwind's built-in colors and adds your custom palette alongside them. Replacing (using theme.colors in v3, or --disable-default-colors in v4) removes all defaults — useful for strict design systems where you want to limit the available palette.

An accessible palette needs sufficient contrast between text and background colors. Use lighter shades (50–200) for backgrounds and darker shades (700–950) for text in light mode, and reverse this for dark mode. WCAG 2.1 AA requires a minimum contrast ratio of 4.5:1 for body text. Our generator produces perceptually uniform shade scales that naturally maintain good contrast across the range.

WCAG Contrast Checker Built In
HEX · RGB · HSL · OKLCHTailwind v3 + v4Color blindness sim

Related Tools

More workbench essentials to speed up your build.

View all

Shadcn/UI Component Previewer

Live preview of shadcn/ui components with instant copy-paste code. Browse rendered components and grab snippets.

Open tool

Next.js Project Structure Generator

Select your stack and instantly get a production-ready folder structure. Copy the entire scaffold in one click.

Open tool

.env File Generator

Pick your tech stack and get a complete, commented .env boilerplate file. Never forget an environment variable.

Open tool

Developer Kits

View all →
$79
one-time payment

SaaS Starter Pro

Complete SaaS foundation with auth, Stripe billing, team management, admin dashboard, and RBAC. Launch in days.

Next.jsStripe
View kit

Next.js Blog Kit

Free

MDX-powered blog with full SEO, dark mode, RSS feed, reading time, and syntax highlighting. Deploy to Vercel in one click.

Auth Boilerplate

$39

Magic link, OAuth (Google, GitHub), 2FA, password reset, and RBAC. Built with Clerk and Next.js — fully production-hardened.

Developer Guides

All guides →
Tutorial
5 min

How to Add Stripe to Next.js (2026)

A complete walkthrough of integrating Stripe Checkout and webhooks into your Next.js application.

Engineering Guide
Read guide

How to Add Razorpay to Next.js (2026): Complete Guide with Code

Tutorial
12 min

Next.js + Prisma + Stripe Tutorial

Tutorial
8 min
Custom builds

Need a custom developer tool?

From specialized code generators to full-stack internal dashboards — we build tools that make your team 10x more productive.

Start a custom build →