CSS Variable Generator
Generate CSS custom properties for colors, spacing scales, and typography.
Output: :root { ... }
:root {
--color-primary: #6366f1;
--color-secondary: #8b5cf6;
--color-accent: #06b6d4;
--color-background: #ffffff;
--color-text: #1f2937;
}About CSS Variable Generator
CSS custom properties (variables) allow you to define reusable values in a central location using the :root selector and reference them with var(--name). This generator helps you build three types of design token sets: color palettes with semantic names, spacing scales based on a base unit and multiplier, and typographic scales using classic musical ratios like the Perfect Fourth (1.333) or the Golden Ratio (1.618).
Private & free — this tool runs entirely in your browser.
Recommended: Kinsta — Fast managed hosting — up to $500 + 10% recurring.affiliate
Related Design & CSS tools
Color Converter
Convert a color to HEX, RGB, HSL, HSB, and CMYK at once.
HEX to RGB
Convert HEX color codes to RGB / RGBA values.
RGB to HEX
Convert RGB values into HEX color codes.
CSS Box Shadow Generator
Visually design CSS box-shadow with a live preview and code.
CSS Border Radius Generator
Visually craft border-radius with a live preview.
HEX to CMYK
Convert HEX colors to CMYK print values.
CMYK to HEX
Convert CMYK print values to HEX colors.
HEX to HSB
Convert HEX colors to HSB / HSV values.