p-4 or text-blue-500) directly in HTML rather than writing custom CSS rules. Tailwind is the most popular utility-first framework.theme.extend key merges them with Tailwind's defaults. The opposite approach - using theme without extend - replaces Tailwind's defaults entirely, removing all built-in utilities unless you redefine them.The Complete Guide to Tailwind CSS Theme Configuration
Tailwind CSS ships with a beautifully designed default theme - but almost every real project needs to extend it with brand colors, a custom type scale, or a tighter spacing system. Understanding how the config file works lets you take full advantage of the framework instead of fighting against it.
How to use this tool
Select your brand colors using the pickers on the left. Each color you choose becomes the "500" weight of a full 10-step palette, generated by blending toward white and black. In the spacing panel, set your base unit in pixels (Tailwind's default is 4px), choose a scale type, and drag the steps slider. The visual preview and config output update instantly. When you're happy, click "Copy Config" to paste directly into your project, or "Download JSON" to save theme.json for use with a build pipeline.
Extending vs. overwriting the default theme
The output this tool generates lives inside theme.extend. That means your custom colors and spacing values are added alongside Tailwind's built-ins - you keep all 22 default color palettes, all default spacing steps, and every other utility. If you instead paste the output into theme directly (without extend), you will replace Tailwind's defaults and those built-in classes will disappear from your generated CSS.
How the color math works
Your chosen color is placed at the 500 weight. Shades 50, 100, 200, 300, and 400 are created by linearly blending your color with pure white: shade 50 is 95% white, shade 100 is 90%, up to shade 400 at 20% white. Shades 600, 700, 800, 900, and 950 blend toward pure black at the same graduated ratio. This mirrors the methodology Tailwind's core team used to design the default palette, so your custom colors will feel harmonically consistent with system colors like slate or stone.
Choosing the right spacing scale
The default 4px linear scale works well for component-dense UIs like dashboards and admin panels - steps are predictable and the numbers map to familiar Tailwind utilities (p-1 = 4px, p-2 = 8px). A 1.25x ratio scale adds gentle acceleration and suits most marketing sites. The Golden Ratio (1.618) creates dramatic spacing jumps that work beautifully for editorial layouts, large typography, and landing pages where whitespace is a design element. The right choice depends on your content density.
FAQ
theme.extend in your tailwind.config.js adds your custom colors and spacing on top of Tailwind's built-in defaults, so you keep utilities like gray-100 or p-4. Using theme (without extend) replaces Tailwind's defaults entirely, meaning only your custom values are available. This tool generates output inside theme.extend so your existing design system is preserved.theme.json, you can import it inside tailwind.config.js using: const theme = require('./theme.json'); Then spread its values inside theme.extend, for example: theme: { extend: { colors: theme.colors, spacing: theme.spacing } }. This keeps your config file clean and lets you version-control the theme separately from your Tailwind configuration.