Deck Brand (DESIGN.md Compiler)
Brand alignment freezes identity and design rules (DESIGN.md), not rigid placeholder boxes.
A single DESIGN.md compiles into a machine-readable tokens.json that feeds both deck-builder
(DeckCraft theme, colors, fonts, radii) and deck-visuals (Three.js lighting/materials, D3 charts,
SVG diagrams, shaders) so every slide and custom visual speaks the exact same visual language.
Three Onboarding Paths → One DESIGN.md
- User supplies
DESIGN.md: Validate and compile directly withscripts/parse_design_md.mjs. - User supplies a legacy
.pptx/.potxtemplate: Runscripts/decompile_pptx.mjs <file.pptx> --out DESIGN.mdto automatically extract dominant colors, fonts, and slide dimensions into a cleanDESIGN.mdrather than fighting legacy template boxes. - No brand file yet: Draft a topic-specific
DESIGN.mdfollowing the 8 canonical sections fromgoogle-labs-code/design.md, verify WCAG contrast, and save it alongside the project.
Hybrid Dark + Light Decks: Add an optional
darkColors:block inDESIGN.mdfrontmatter alongsidecolors:when using cinematic dark cover/focal slides with light analytical slides.parse_design_md.mjsautomatically approves both palettes intokens.approvedHexColors.
Canonical DESIGN.md Structure
Follow the google-labs-code/design.md specification:
- YAML Frontmatter (normative machine-readable tokens:
name,mode,colors,typography,layout,shapes). - Eight Canonical Markdown Sections (in fixed order; omit only if irrelevant):
## Overview— product/brand identity, audience, visual ethos, and anti-patterns.## Colors— palette roles (background,surface,text,textMuted,primary,secondary,accent) and WCAG contrast intent.## Typography— heading, body, and mono font families (prefer DeckCraft's bundled OFL fonts likeInter,Poppins,Montserrat,Playfair Display,Merriweather,Source Sans 3,Source Serif 4,Roboto,Lato,Liberation Monounless custom TTF/OTF fonts are loaded viafont.add).## Layout— safe margins (≥36pt/0.5"on DeckCraft's960×540canvas), spacing scale, density philosophy.## Elevation & Depth— flat tonal shifts vs. shadows, borders, glow, or 3D depth treatment.## Shapes— corner radius philosophy (sharp/rounded/squircle) and visual motif.## Components— slide cards, stat callouts, diagram nodes, tables, and chart framing rules.## Do's and Don'ts— explicit enforceable rules checked bydeck-eval.
Compiling DESIGN.md
Run the compiler script (zero external npm dependencies, Node 18+):
node skills/deck-brand/scripts/parse_design_md.mjs path/to/DESIGN.md --out-dir build/brand
This produces:
build/brand/tokens.json— normalized palette, typography, layout, shape tokens, WCAG audit, and parseddos/donts.build/brand/theme-commands.txt— ready-to-rundeckcraft-cli --cmd-filecommands (design.colors,design.fonts,design.background).
Brand Craft Guardrails
- Dominance over equality: 60–70% visual weight on background/surface, 20–30% on primary text/structure, 5–10% on sharp accent.
- No generic defaults: Never default to corporate blue or beige/cream unless explicitly specified in
DESIGN.md. - Contrast first: Body text against
backgroundandsurfacemust meet WCAG AA (≥ 4.5:1); large display titles and UI accents must meet ≥ 3.0:1. Fix contrast inDESIGN.mdbefore building slides. - Font availability: Check bundled DeckCraft fonts first; if the brand requires a custom font file (
.ttf/.otf), register it viafont.addindeck-builder.