A brand is one file, brands/<name>/brand.ts, plus its logo and font files. This page takes you from a copy of the default brand to a brand of your own that passes deck brand check and renders your decks. It doubles as the checklist for reviewing a brand an agent wrote.
What a brand file looks like
brand.ts default-exports one defineBrand({...}) call from @deckster/brand. defineBrand returns its argument unchanged and exists for type checking. The file is data, and the CLI validates it every time it loads the brand. This is the start of default:
import { defineBrand } from '@deckster/brand';
export default defineBrand({
name: 'default',
label: 'Default',
color: {
palette: {
ink: { 0: '#ffffff', 25: '#fcfcfd', 50: '#f4f5f8', /* ... */ 950: '#0c0e13' },
cobalt: { 50: '#eef2ff', /* ... */ 600: '#2d4ae0', /* ... */ 900: '#1b286b' },
},
roles: { bg: 'ink.25', surface: 'ink.50', fg: 'ink.900', muted: 'ink.600', accent: 'cobalt.600', /* ... */ },
surfaces: { default: {}, inverse: { bg: 'ink.950', /* ... */ }, /* accent, gradient */ },
data: { categorical: [/* ... */], sequential: [/* ... */], diverging: [/* ... */], context: 'ink.300' },
},
// gradients, typography, shape, spacing, logo, icons, imagery, chrome, motion
});Every top-level section is required except code, diagram and charts. When you leave those three out, they are derived from the roles and the type scale. The brand schema lists every field.
From a copy to a checked brand
These steps make a brand called acme in a workspace called talks.
-
Get a copy of the repository once, with git or as a ZIP download from GitHub:
git clone --depth 1 --branch v0.7.0 https://github.com/sandrinodm/deckster.git ~/deckster -
Copy a published brand from it into
brands/acme/.defaultis the plainest starting point. Deletepackage.jsonandtsconfig.json, which point into the monorepo.mkdir -p brands cp -R ~/deckster/brands/default brands/acme rm brands/acme/package.json brands/acme/tsconfig.json -
Run
deck brand check acme. The copy still calls itselfdefault, andnamemust match the folder:$ deck brand check acme brands/acme/brand.ts error name: The brand is named "default" but lives in brands/acme/. Fix: Set `name: "acme"`, or rename the folder to brands/default/. acme: cannot be used (1 error, 0 warnings). -
Set
name: 'acme'and alabel, the name people read. Check again:$ deck brand check acme brands/acme/brand.ts acme: is valid (0 errors, 0 warnings). -
Replace the colours. Put your scales in
color.palette, point the ten roles at them, and give theinverse,accentandgradientsurfaces their own roles. You can also delete a surface and let the CLI derive it. Replace thedatapalettes too. Palettes, surfaces and typography shows how each part works. Rundeck brand check acmeafter each change. It checks contrast on every surface, and each fix names a colour that passes. -
Set the three font families and the type scale. The CLI carries Inter, JetBrains Mono and Bricolage Grotesque. A family from any other Fontsource package needs
npm install <package>in the workspace folder, anddeck brand checkprints the exact command. Fonts and assets covers the other font sources and thesubstituteeach family takes. -
Replace the files in
logos/and update each variant’sfileandaspect(its width divided by its height). A variant whose file is missing fails the check:$ deck brand check acme brands/acme/brand.ts error logo.variants.reversed.file: logos/mark-reversed.svg does not exist in brands/acme/. Fix: Put the logo itself (an SVG, PNG or WebP, not a link to a file elsewhere) in the brand folder, usually logos/, or fix the path. acme: cannot be used (1 error, 0 warnings). -
Set
icons.settolucideortabler, the two Iconify sets the 0.7.0 CLI carries, andicons.strokeWidthto a value from 0.5 to 4. -
Give diagrams the brand’s look in
diagram: the edges, group outlines, edge labels and the cards nodes are drawn with. Restyle thedefaultcard first, since every card takes its corner radius, outline width and title type from it. Diagram look and cards walks through it. Leave the section out and diagrams take a look derived from the roles andshape. -
Look at the brand on a real deck, then render stills:
deck dev launch-review --brand acme
deck shot launch-review --brand acmedeck shot writes one PNG per slide to .deck/shots/launch-review@acme/. A deck with one slide per layout shows the most, so lint and shoot one with --brand acme before you call the brand done.
- When it looks right, set
brand: 'acme'in the deck’sdeck.config.ts, or start new decks withdeck new <deck> --brand acme.
What stops a brand from loading
A brand that fails its checks doesn’t load. deck dev, build, shot and lint stop and print the brand file, the field and the fix. The checks run in stages, and you see every problem from the first stage that finds one:
- Schema: a missing field, a value out of range, or an unknown field (the fix names the nearest valid one).
- References: a palette step, gradient, surface, logo variant, image treatment, easing, duration, font weight or diagram card that the brand uses but doesn’t define.
- Quality: contrast between role pairs and of the card colours you write on every surface, and data colours that can’t be told apart with normal vision or a colour-vision deficiency.
- Files: the
namematches the folder, font packages are installed, and font and logo files exist.
Check a brand shows the output of each stage and the warnings that don’t stop a brand. To have an agent build the brand from an existing template, PDF or website, see import a brand.