CSS Variables Generator

Generate consistent CSS custom properties with shade palettes for colors, spacing, and typography.

Base Colors
Settings
Generated CSS
/* Click Generate to create your CSS variables */
Primary shade palette
Preview
Sample Button
How it works

The generator converts each input color from HEX to HSL (Hue, Saturation, Lightness). It then creates a 10-step shade scale (50, 100, 200 ... 950) by adjusting the Lightness channel — low values produce soft tints for backgrounds, high values create deep shades for text and accents. Spacing and typography scales follow a consistent multiplier (1.25 for type, 1 for spacing) so every derived value stays proportional. The result is emitted as standard :root custom properties, ready to drop into your stylesheet.

Frequently asked questions
What are CSS custom properties (variables)? ▾
CSS custom properties, also called CSS variables, are entities defined by CSS authors that contain specific values to be reused throughout a document. They are set with the var() function and follow the --name syntax, enabling consistent theming and easier maintenance.
How does the shade generator work? ▾
The generator converts your base color from HEX to HSL, then produces 10 shades by systematically varying the Lightness channel. Lower lightness values (50, 100) create lighter tints for backgrounds, while higher values (800, 900, 950) produce darker shades for text and accents.
Can I use CSS variables in all modern browsers? ▾
Yes. CSS custom properties are supported in all modern browsers including Chrome, Firefox, Safari, and Edge. They have over 97% global usage support and are the standard way to implement dynamic theming in modern web development.
Related tools
Copied to clipboard
Free tools by TUNA — energy supply from vetted manufacturers