W3C Design Tokens (DTCG) JSON Generator
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.
Colors (5/12)
Output
{
"color": {
"$type": "color",
"primary": {
"$value": "#2563EB"
},
"secondary": {
"$value": "#7C3AED"
},
"success": {
"$value": "#16A34A"
},
"warning": {
"$value": "#F59E0B"
},
"surface": {
"$value": "#F8FAFC"
}
}
}Technical Specification & Mathematical Principles
How the Design Tokens Export (DTCG JSON) Works
The Design Tokens Community Group format stores each token as an object with a $value and a $type. For colors the type is "color" and the value is a hex string such as "#3B82F6". Tokens are nested in groups, and a $type placed on a group is inherited by every token inside it.
This generator emits one group containing your named colors. Token names are lowercased, special characters become hyphens and duplicates receive numeric suffixes, because names must not contain dots, braces or start with a dollar sign.
Frequently Asked Questions
Is this the final W3C specification?
What is the difference between $value and value?
How do I use the JSON in Style Dictionary?
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.
SCSS 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.
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.