Mastering Tailwind CSS Color Scales
Understand how to craft custom 50-900 color scales for your Tailwind CSS configuration files.
Read GuideDeveloper
Turn any color into a Tailwind 50–950 shade scale for tailwind.config.js or @theme.
Developer
Paste in a brand color and this Tailwind CSS color generator builds a full 11-step scale from 50 to 950, matching the naming Tailwind uses for its built-in palettes. Shade 50 is the lightest tint, 950 is the deepest shade and your base color sits near 500. You get the scale twice: as a colors object for tailwind.config.js and as Tailwind v4 @theme CSS variables, so the same palette works whether your project uses the older JavaScript config or the newer CSS-first setup.
Mid-scale shades around 500 often fall below the 4.5:1 contrast ratio needed for small white text, so check 600 and 700 before using them for buttons with white labels. A reliable pattern is 50 or 100 for tinted backgrounds, 200 or 300 for borders, 600 or 700 for buttons and links, and 900 or 950 for headings. In dark mode, flip the scale and test the lighter shades against your dark background.
FAQ
In Tailwind v3, add a colors object inside theme.extend in tailwind.config.js, which keeps the default colors and adds yours. In Tailwind v4, declare CSS variables named with the --color- prefix inside an @theme block in your CSS file. Either way, Tailwind then generates utilities such as bg, text and border classes for every shade.
The numbers are lightness steps within one hue. 50 is the lightest, 950 is the darkest and 500 is roughly the middle, with 100 to 900 in between. Using the same numbering for every color lets you swap one hue for another without rethinking which shade to use for backgrounds, borders or text.
Tailwind v4 moved configuration into CSS, so custom colors are defined as variables in an @theme block instead of a JavaScript config file. Those variables are also available as regular CSS custom properties anywhere in your styles. The default palette in v4 is defined in the OKLCH color space, while HEX values still work for custom colors.
No, the 500 position is a convention, not a rule. This generator places your base near 500 so the scale has room to lighten and darken evenly. If your brand color is very light or very dark, you may find it matches a lighter or darker step better, and you can use whichever shade passes contrast for each job.
Learn more
Understand how to craft custom 50-900 color scales for your Tailwind CSS configuration files.
Read GuideLearn how to build a monochromatic color scheme for the web: create a single-hue scale, assign UI roles, keep text accessible and adapt it for dark mode.
Read GuideTints, shades, and tones explained: how each maps to HSL lightness and saturation, how to build UI color scales, and how to stop dark shades looking muddy.
Read Guide