Tint & Shade Generator
Generate color tints and shades from any base color with customizable steps. Export to CSS, SASS, Tailwind, JSON, and CSV formats. Includes reverse mode to find base colors from known tints or shades.
Updated
What is the Tint & Shade Generator?
Create professional color scales from any base color. Generate tints (mixtures with white) and shades (mixtures with black) with precise control over step count, color space input, and export formats.
What You Can Do
- Generate color scales from HEX, RGB, HSL, or OKLCH inputs
- Customize step counts from 1 to 20 tints and 1 to 20 shades
- Export to multiple formats: CSS variables, SASS, LESS, Tailwind config, JSON, and CSV
- Reverse engineer base colors from known tints or shades
- Preview accessibility with WCAG contrast ratios against black and white text
- Copy individual colors or entire palettes with one click
Perfect For
- Design systems — Create consistent color palettes with predictable naming
- Tailwind CSS — Generate custom color scales that match the framework's conventions
- Theme development — Build light/dark mode variations from a single brand color
- Accessibility-first design — Verify contrast compliance as you build your palette
Input Methods
| Format | Description | Example |
|---|---|---|
| HEX | Standard web hex with picker | #3B82F6 |
| RGB | Red, Green, Blue (0-255) | 59, 130, 246 |
| HSL | Hue, Saturation, Lightness | 217°, 91%, 60% |
| OKLCH | Perceptually uniform color space | 60% 0.15 250 |
The generator uses linear RGB interpolation for mathematically precise mixing, ensuring your tints and shades maintain the hue relationships you expect.
How it works
How the Tint & Shade Generator Works
Color Mixing Mathematics
The generator creates tints and shades through linear interpolation in RGB color space. This produces predictable, mathematically consistent results.
Tints: Mixing with White
To create a tint at step n of N total steps:
tint = base_color × (n/N) + white × (1 - n/N)
For example, with 5 tint steps toward base #3B82F6:
- Step 1 (20%): 80% white + 20% base
- Step 5 (100%): 0% white + 100% base (the original color)
Shades: Mixing with Black
To create a shade at step n of N total steps:
shade = base_color × (1 - n/N) + black × (n/N)
For example, with 5 shade steps from base #3B82F6:
- Step 1 (20%): 80% base + 20% black
- Step 5 (100%): 0% base + 100% black
Color Space Conversions
HEX ↔ RGB
Standard 8-bit per channel conversion with optional short-form detection (#FFF → #FFFFFF).
RGB ↔ HSL
Uses the cylindrical-coordinate representation with hue in degrees (0-360), saturation and lightness as percentages (0-100).
RGB ↔ OKLCH
Implements the Oklab color space conversion for perceptually uniform lightness:
- L: Lightness (0-100%)
- C: Chroma (color intensity, typically 0-0.4)
- H: Hue angle (0-360°)
OKLCH ensures that a 20% lightness increase looks like 20% more light to human perception, unlike HSL which can have uneven perceptual steps.
Reverse Mode Algorithm
When you know a tint or shade but not the base:
estimated_base = (known_color - mix_color × (1 - t)) / t
Where t is the known lightness percentage as a fraction (0-1). The result is clamped to valid RGB range (0-255) and may require manual refinement for extreme values.
Export Format Generation
| Format | Structure | Use Case |
|---|---|---|
| CSS | :root { --color-100: #...; } |
Native CSS custom properties |
| SASS | $color-100: #...; |
Preprocessor variables |
| LESS | @color-100: #...; |
Alternative preprocessor |
| Tailwind | Nested object for theme.extend.colors |
JavaScript config files |
| JSON | Structured object with all metadata | API consumption, storage |
| CSV | Tabular with hex, RGB, HSL columns | Spreadsheet import |
Naming Convention
The generator follows Tailwind's numeric scale by default:
- Shades: 50, 100, 200, 300, 400 (darkest to base)
- Base: 500
- Tints: 600, 700, 800, 900, 950 (base to lightest)
This mapping adjusts automatically based on your step counts to maintain logical progression.
Examples
Generate blue color scale
Create 5 tints and 5 shades from a base blue color for a complete design system palette
Reverse engineer from a tint
Find the original base color when you only have a lighter tint and know its approximate lightness
Export Tailwind config
Generate a complete Tailwind-compatible color object for custom themes
OKLCH perceptually uniform scale
Generate a color scale using OKLCH color space for more perceptually uniform lightness steps
Frequently asked questions
What is the difference between a tint and a shade?
What is the difference between a tint and a shade?
A tint is created by mixing a color with white, making it lighter while maintaining the same hue. A shade is created by mixing a color with black, making it darker. This generator produces both in customizable steps from your base color, giving you a complete monochromatic scale.
Why do my tints look "muddy" or desaturated?
Why do my tints look "muddy" or desaturated?
This is a perceptual effect of additive color mixing. When you mix a saturated color with white, the resulting tint can appear less vibrant because white contains all wavelengths equally. For more perceptually uniform results, try using OKLCH input — its lightness channel is designed to match human vision better than HSL or simple RGB mixing.
What is OKLCH and why should I use it?
What is OKLCH and why should I use it?
OKLCH (Oklab Lightness, Chroma, Hue) is a modern color space designed for perceptual uniformity. Unlike HSL where 50% lightness doesn't always look halfway between black and white, OKLCH's lightness channel accurately represents how humans perceive brightness. Use it when you need visually even steps in your color scale, especially for accessibility-critical designs.
How does Reverse Mode estimate the base color?
How does Reverse Mode estimate the base color?
Reverse Mode uses inverse linear interpolation. If you provide a tint at 75% lightness (25% mixed with white), the generator calculates: base ≈ (tint - 25% × white) / 75%. This gives a mathematically correct estimate, though extreme values (very dark tints or very light shades) may produce out-of-gamut colors that get clamped to valid RGB.
Why are there only 20 maximum steps?
Why are there only 20 maximum steps?
The 20-step limit balances usability with precision. More steps create diminishing visual differences that become hard to distinguish and use effectively. For design systems, 5-10 steps per direction typically provide sufficient granularity. If you need more granular control, generate a smaller scale and use CSS color-mix() or preprocessor functions for intermediate values.
Which export format should I use for Tailwind CSS?
Which export format should I use for Tailwind CSS?
Use the Tailwind export format. It generates a nested JavaScript object compatible with theme.extend.colors in your tailwind.config.js. The naming follows Tailwind's convention (50, 100, 200... 950), making migration seamless if you later switch to the framework's built-in colors.
How accurate is the WCAG contrast preview?
How accurate is the WCAG contrast preview?
The contrast ratio uses the relative luminance formula from WCAG 2.1, which weights RGB channels as: 0.2126×R + 0.7152×G + 0.0722×B. This accounts for human eye sensitivity to green light. The preview shows ratios against pure black and white — for real-world testing with your actual background colors, use a dedicated contrast checker with your specific design context.
Can I generate tints without shades or vice versa?
Can I generate tints without shades or vice versa?
Yes. Set either Tint Steps or Shade Steps to 0 in the settings. This produces a one-directional scale useful for specific design needs, such as creating a highlight-only palette for light UIs or shadow-only scales for dark mode emphasis.
Why does my hex color sometimes show a short form?
Why does my hex color sometimes show a short form?
Short hex notation (#RGB instead of #RRGGBB) is displayed when all three color channels are repeating pairs (e.g., #FF6600 cannot shorten, but #FF6633 becomes #F63). The generator detects this automatically and shows the short form in the "hex-short" display mode, which can reduce CSS file sizes slightly.
What's the best way to use this for a complete design system?
What's the best way to use this for a complete design system?
- Start with your brand color as the base (500)
- Generate 4-5 tints and 4-5 shades for a 9-11 color scale
- Export to CSS variables for immediate use
- Verify contrast on the 400/500/600 range for text/background pairs
- Repeat for accent colors, keeping consistent step counts
- Document usage: 50-200 for backgrounds, 300-400 for borders, 500-600 for primary actions, 700-900 for text This creates a predictable, maintainable color system with built-in accessibility considerations.
Related tools
More utilities you might find handy.
CMYK to RGB
Convert CMYK print colors to RGB values instantly with live preview, hex output, and copy-ready results.
Color Blindness Simulator
Preview how images and designs appear to people with protanopia, deuteranopia, tritanopia, and other color vision deficiencies
Color Escape Code Generator
Generate ANSI terminal color escape codes for styles, foregrounds, and backgrounds across bash, python, javascript, and more.