SCSS / SASS Color Map & Variables Generator
Generate SCSS color variables and a $colors map from named HEX colors, ready for map-get(). Instant output you can paste into any Sass project.
Colors (5/12)
Output
$primary: #2563EB;
$secondary: #7C3AED;
$success: #16A34A;
$warning: #F59E0B;
$surface: #F8FAFC;
$colors: (
"primary": #2563EB,
"secondary": #7C3AED,
"success": #16A34A,
"warning": #F59E0B,
"surface": #F8FAFC
);
// Usage: color: map-get($colors, "primary");Technical Specification & Mathematical Principles
How the SCSS Variables Generator Works
Sass variables start with a dollar sign: $primary: #3B82F6;. A Sass map groups values by key: $colors: ("primary": #3B82F6, "surface": #FFFFFF);. Values are retrieved with map-get($colors, "primary"), or with map.get after @use "sass:map".
The generator emits both forms from the same list. Names are normalized to lowercase hyphenated keys, duplicates are numbered, and trailing commas are handled so the output compiles without edits.
Frequently Asked Questions
Should I use variables or a map?
Does it work with the Sass module system?
Why are map keys quoted?
Related Design & Color Instruments
CSS Variables Generator
Create a CSS :root block of color custom properties like --color-primary: #3B82F6. Name your colors, set a prefix and copy production-ready CSS.
Design Tokens Export (DTCG JSON)
Generate W3C Design Tokens Community Group JSON for colors with $value and $type. Name up to 12 tokens and copy a spec-shaped file for Style Dictionary.
Tailwind Palette Generator
Generate a complete 11-step color scale (50, 100, 200, ... 950) ready to paste into your tailwind.config file.
Brand Palette Generator
Generate a full corporate color system (Primary, Secondary, Accent, Neutral, Surface) from any core brand color.