Skip to content

Palettes, surfaces and typography

Define a brand's colours, slide surfaces and type scale.

A brand’s color section holds its palette, the ten roles that layouts paint with, the surfaces that remap those roles, and the data colours for charts. Its typography section sets three families and eleven type steps. This page shows how to write each part so the brand passes deck brand check. Brands and surfaces explains why the model works this way.

  • The showcase slide "Lint renders every step in a real browser, then measures what it drew" in the default brand.default
  • The showcase slide "Lint renders every step in a real browser, then measures what it drew" in the nocturne brand.nocturne
  • The showcase slide "Lint renders every step in a real browser, then measures what it drew" in the fieldnote brand.fieldnote
  • The showcase slide "Lint renders every step in a real browser, then measures what it drew" in the kinetic brand.kinetic
  • The showcase slide "Lint renders every step in a real browser, then measures what it drew" in the tidewater brand.tidewater
showcase / lint-pathThe same slide file, rendered with --brand

Palettes and roles

color.palette holds named scales, each mapping a step to a literal colour. Step names are lowercase letters and digits (50, 600, base). Palette names are kebab-case and can’t reuse a role, type step or data palette name, because each becomes a Tailwind class.

palette: {
  ink: { 0: '#ffffff', 25: '#fcfcfd', 50: '#f4f5f8', /* ... */ 900: '#161920', 950: '#0c0e13' },
  cobalt: { 50: '#eef2ff', /* ... */ 600: '#2d4ae0', 700: '#2439b8', /* ... */ },
  /* violet, amber, teal, cyan, rose, mint, coral */
},

color.roles assigns the ten roles: bg, surface (cards and panels), fg, heading, muted, accent, accent-fg (text on an accent fill), border, positive and negative. All are required except heading, which falls back to fg. A role’s value is one of:

  • a palette step: 'cobalt.600'
  • a step with an opacity in percent: 'ink.0/12'
  • a literal: '#2d4ae0' or 'oklch(0.62 0.19 259)'

Layouts and components paint only with roles, never with palette steps, so a slide picks up whatever the brand assigns.

Surfaces

A surface is a set of role overrides that a slide selects with surface: in its frontmatter. Every brand has default, inverse, accent and gradient, so any slide works in any brand. default usually stays empty and uses the roles as they are:

surfaces: {
  default: {},
  inverse: { bg: 'ink.950', surface: 'ink.900', fg: 'ink.50', muted: 'ink.400', accent: 'cobalt.400', /* ... */ logo: 'reversed' },
  accent: { bg: 'cobalt.600', /* ... */ },
  gradient: { gradient: 'horizon', surface: 'ink.0/12', fg: 'ink.0', /* ... */ },
},

A surface you leave out is derived from your roles, so a brand that only sets default still has all four. The gradient surface must name one of the brand’s gradients (linear, radial or mesh, each with optional grain up to 0.4). You can add surfaces of your own: fieldnote adds notebook. Besides roles, a surface can set logo (the logo variant shown on it), data, code, diagram, shadow and background.

Text colours on each surface

Small text needs 4.5:1, but accent, positive and negative only need 3:1, because they mostly carry marks and large text. So each surface also gets an accent, positive and negative text colour held to 4.5:1. Where the role falls short, the CLI derives a lighter or darker shade. deck brand prints that shade after the surface’s roles:

$ deck brand default
...
  accent (dark): bg #2d4ae0, surface #2439b8, fg #ffffff, heading #ffffff, muted #dde5ff, accent #ffffff, accent-fg #2439b8, border #3f62f5, positive #a5f3fc, negative #ffa98f; small text: negative #ffcbbb
...

Here negative (#ffa98f) reaches 3:1 on cobalt but not 4.5:1, so small negative text uses #ffcbbb. The output above is cut to that one surface. Check a brand lists every pair and its minimum.

Backgrounds behind a surface

A surface’s background paints up to six layers over its colour and gradient, in order. The files are SVG, PNG, WebP or JPEG inside the brand folder, usually backgrounds/:

  • { type: 'image', file, fit?, focal?, opacity?, treatment?, tint? }: a photo or texture that fills the slide
  • { type: 'placed', file, aspect, anchor, width, offset?, opacity?, rotate? }: a mark at a corner, an edge or the centre
  • { type: 'pattern', file, aspect, tile, offset?, opacity? }: a repeating tile
  • { type: 'gradient', gradient, opacity? }: one of the brand’s gradients, such as a scrim over a photo

fieldnote’s notebook surface rules the slide like paper and draws a margin line:

notebook: {
  bg: 'paper.50',
  background: [
    { type: 'pattern', file: 'backgrounds/ruled.svg', aspect: 1, tile: 48, opacity: 0.9 },
    { type: 'placed', file: 'backgrounds/margin.svg', aspect: 0.0037, anchor: 'left', width: 4, offset: { x: 84, y: 0 } },
  ],
},

A surface with an image or pattern layer must set its own bg: the colour the background reads as. Contrast checks, the chart plate and solid-colour exports measure against that bg. Every bg must be opaque.

Data colours

color.data holds the chart palettes:

  • categorical: 3 to 12 colours for unordered series, in the order charts use them
  • sequential: at least 3 colours from low to high
  • diverging: at least 3 colours from one extreme through a neutral midpoint to the other
  • context: the muted colour for everything that isn’t highlighted

The check measures them on each surface’s chart plate, the opaque panel charts draw behind themselves. Neighbouring categorical colours must be at least 10 apart (OKLab distance ×100) with normal vision and 8 apart under protanopia, deuteranopia and tritanopia, and it warns below 15. A sequential palette must change lightness in one direction. A diverging palette must move away from its midpoint in lightness on both sides, and its two ends must stay 12 apart under protanopia and deuteranopia. context must reach between 1.4:1 and 4.5:1 on the plate. A surface can replace any palette, and its plate, under its own data key. A failure names both colours:

$ deck brand check acme
brands/acme/brand.ts
  error   color.data.categorical[1]: #3f62f5 is too close to its neighbour #2d4ae0 under normal (ΔE 6.8, wants 10), protanopia (ΔE 5.8, wants 8), deuteranopia (ΔE 5.8, wants 8), tritanopia (ΔE 6.3, wants 8).
          Fix: Replace one of the two colors with one that differs in lightness as well as hue; no reordering separates every neighbour.
...

That run set the second categorical colour of default to cobalt.500; the output is cut after the first error.

Type

typography.families sets display, body and mono (fonts and assets covers where their files come from). typography.scale sets all eleven steps: display, headline, title, lead, body, small, caption, label, stat, quote and code. Each step is { family, size, lineHeight, tracking, weight } plus optional case (none or upper), style, OpenType features such as tnum, and variable-font axes:

label: { family: 'display', size: 22, lineHeight: 1.2, tracking: 0.07, weight: 640, case: 'upper', axes: { opsz: 24, wdth: 100 } },

Sizes are canvas pixels on the 1920×1080 slide, and none may be below 20. lineHeight runs from 0.7 to 2.5, tracking from -0.1 to 0.5 em, and weight from 1 to 1000. The two brands below differ most at the top of the scale: default sets display 160px, headline 80px, title 48px and body 36px, and nocturne sets 168px, 84px, 56px and 34px.

Motion

motion holds named easings (cubic-bezier control points [x1, y1, x2, y2]), named durations in milliseconds (at most 3000), and the default slide transition: a kind (none, fade, slide, rise, push, cover, wipe or zoom) with a duration and easing by name. The kit’s entrances, step reveals and chart builds read the easings standard, emphasized and exit and the durations fast, base and slow, so define all six. A brand that leaves some out still loads with derived values. default uses { kind: 'fade', duration: 'base', easing: 'standard' } with base at 280.

The default brand

Default brands/default. The default brand: crisp, confident and light-first. Cool grays with one cobalt accent, Bricolage Grotesque for display type and labels (slightly condensed, with ink traps that show at slide sizes, set with open tracking so letters never touch) over Inter for reading, a dusk gradient from cobalt into ink, soft medium radii and quick, quiet motion. The logo sits top right, so nothing in the margin stacks on a footnote.

Palette

ink
  • 0#ffffff
  • 25#fcfcfd
  • 50#f4f5f8
  • 100#eaecf1
  • 200#d9dce4
  • 300#c2c7d1
  • 400#9aa1ae
  • 500#707786
  • 600#555c6a
  • 700#3d434f
  • 800#272b34
  • 900#161920
  • 950#0c0e13
cobalt
  • 50#eef2ff
  • 100#dde5ff
  • 200#bccbff
  • 300#8fa8ff
  • 400#6283ff
  • 500#3f62f5
  • 600#2d4ae0
  • 700#2439b8
  • 800#1f2f8f
  • 900#1b286b
violet
  • 400#9a7bff
  • 600#6a3ff0
  • 700#5530c9
  • 800#42269c
amber
  • 200#fde3a7
  • 400#f5b53d
  • 600#b86e00
  • 700#955700
teal
  • 300#5eead4
  • 400#34c3b0
  • 600#0b8a7c
  • 700#086e64
cyan
  • 200#a5f3fc
  • 700#0a7a8a
rose
  • 400#ff7a93
  • 600#d6335a
mint
  • 200#b6f0d2
  • 400#45d08f
  • 700#11804f
coral
  • 200#ffd0c9
  • 300#ffa98f
  • 400#ff7d6b
  • 600#d23c28

Surfaces

  • surface: default light

    bg #fcfcfdfg #161920heading #161920muted #555c6aaccent #2d4ae0border #d9dce4

  • surface: inverse dark

    bg #0c0e13fg #f4f5f8heading #f4f5f8muted #9aa1aeaccent #6283ffborder #272b34

  • surface: accent dark

    bg #2d4ae0fg #ffffffheading #ffffffmuted #dde5ffaccent #ffffffborder #3f62f5

  • surface: gradient dark

    bg #2439b8fg #ffffffheading #ffffffmuted #eef2ffaccent #ffffffborder #ffffff3d

Typefaces

RoleFamilySource
displayBricolage Grotesque@fontsource-variable/bricolage-grotesque
bodyInter@fontsource-variable/inter
monoJetBrains Mono@fontsource-variable/jetbrains-mono

Type scale (px on the 1920×1080 canvas)

StepFaceSizeLine heightWeightTrackingCase
displaydisplay1600.98640-0.014—
headlinedisplay801.02620-0.012—
titledisplay481.1600-0.006—
leadbody401.36400-0.014—
bodybody361.4400-0.01—
smallbody261.454000—
captionbody241.44500—
labeldisplay221.26400.07upper
statdisplay1840.92620-0.008—
quotedisplay841.08520-0.02—
codemono281.554500—

Diagrams

Edges: 2 px, round corners, triangle arrowheads. Groups: no outline, radius 20 px. Edge labels: plain, in the caption step. Kinds: external uses outline.

CardFillBorderLookTitle
default#f4f5f8#d9dce4 1 pxradius 12 px, sm shadow, solid icondisplay 600
outlinenone#d9dce4 1 pxradius 12 px, chip icondisplay 600
solid#2d4ae0noneradius 12 px, plain icondisplay 600
tint#2d4ae01f#2d4ae0 1 pxradius 12 px, solid icondisplay 600
raised#f4f5f8#d9dce4 1 pxradius 12 px, md shadow, chip icondisplay 600

Colours on the default surface, sizes in px on the 1920×1080 canvas. A slide picks a card with card="..."; see diagram look and cards.

The nocturne brand

Nocturne brands/nocturne. Nocturne: dark-first and editorial. Violet-black night, a warm ember accent, a soft optical serif for display type with mono labels, a grainy aurora gradient, sharp corners and slow, cinematic motion. It contrasts with the default brand on every axis.

Palette

night
  • 100#ebe8f4
  • 200#d6d2e8
  • 300#b4aed0
  • 400#8c84ad
  • 500#635a86
  • 600#433a63
  • 700#2d2645
  • 800#1f1a30
  • 850#181426
  • 900#120f1c
  • 950#0b0911
paper
  • 50#f7f2ea
  • 100#efe7da
  • 200#e0d4c1
  • 600#6b5e4c
ember
  • 200#ffd2c2
  • 300#ffb59a
  • 400#ff8f6b
  • 500#ff6f4a
  • 600#e9542f
  • 700#c23f1e
  • 800#8f2d14
  • 900#5e1d0c
orchid
  • 300#ddb3ff
  • 400#c48cff
  • 600#8b3fd9
  • 700#6a2bb0
  • 800#4a1d7d
sky
  • 300#a3d1ff
  • 400#62b0ff
  • 700#1f5fae
  • 800#173f73
gold
  • 300#f8d77a
  • 400#f2c14e
jade
  • 300#8ee6c2
  • 400#4fd19c
  • 700#137a55
  • 900#083d2a
rose
  • 300#ffa3b1
  • 400#ff6f84
  • 700#b3263c
  • 900#5c0f1f
lagoon
  • 200#67e8f9
  • 300#5eead4
  • 700#0e7490
  • 900#0c4a6e

Surfaces

  • surface: default dark

    bg #0b0911fg #efe7daheading #f7f2eamuted #b4aed0accent #ff8f6bborder #2d2645

  • surface: inverse light

    bg #f7f2eafg #0b0911heading #0b0911muted #433a63accent #c23f1eborder #e0d4c1

  • surface: accent light

    bg #ff6f4afg #0b0911heading #0b0911muted #1f1a30accent #0b0911border #c23f1e

  • surface: gradient dark

    bg #0b0911fg #efe7daheading #f7f2eamuted #d6d2e8accent #ffb59aborder #f7f2ea29

Typefaces

RoleFamilySource
displayFraunces@fontsource-variable/fraunces
bodyManrope@fontsource-variable/manrope
monoIBM Plex Mono@fontsource/ibm-plex-mono

Type scale (px on the 1920×1080 canvas)

StepFaceSizeLine heightWeightTrackingCase
displaydisplay1680.94360-0.012—
headlinedisplay841.04400-0.01—
titledisplay561.1460-0.01—
leadbody381.454000—
bodybody341.464200—
smallbody261.54400.005—
captionbody241.454400.005—
labelmono221.25000.12upper
statdisplay1840.9320-0.03—
quotedisplay881.1340-0.015—
codemono261.64000—

Diagrams

Edges: 1 px, sharp corners, open arrowheads. Groups: 1 px, dashed, radius 0 px. Edge labels: plain, in the label step. Kinds: none mapped.

CardFillBorderLookTitle
default#181426#b4aed0 1 pxradius 0 px, plain icondisplay 400
outlinenone#b4aed0 1 pxradius 0 px, plain icondisplay 400
solid#ff8f6bnoneradius 0 px, plain icondisplay 400
tint#ff8f6b1f#ff8f6b 1 pxradius 0 px, plain icondisplay 400
raised#181426#ff8f6b 1 pxradius 0 px, lg shadow, plain icondisplay 400

Colours on the default surface, sizes in px on the 1920×1080 canvas. A slide picks a card with card="..."; see diagram look and cards.

Every field, with its type and limits, is in the brand schema.

Type to search…

↑↓ navigate↵ selectEsc close