OPF
← All posts

Branding

Set the brand once

Keep colors and typography consistent without fixing every slide.

Brand cleanup should not be the last task before every meeting.

To apply one brand theme across many generated presentations, keep the brand in one place and apply it to every deck the same way. OPF lets a deck share a color scheme and font scheme. Content can refer to named colors such as primary instead of repeating a hex value. Change the shared design and those references follow it; explicit overrides stay intentional.

json
{
  "design": {
    "colorScheme": {
      "primary": "#8CC8FF"
    }
  },
  "slides": [
    {
      "title": [
        {
          "text": "Ready for review",
          "color": "primary"
        }
      ]
    }
  ]
}
Live preview1 / 1

Loading preview…

The same design system also supports organization logos and shared headers and footers. A footer can use {{slide.number}} / {{deck.slideCount}} so numbering follows the deck.

Where the brand lives

A deck's look comes from its design block: a theme (the default catalog has minimal, classic and bold), a fontScheme, a colorScheme, and shared elements such as the footer. The color scheme can be a catalog id such as corporate-blue (the default catalog has 14) or your own named colors, as above. Slides that say primary take the color from the scheme, so the slides never repeat a hex value.

That makes the brand one small piece of JSON. Whoever writes the slides, a person, a script or an agent, does not need to know it.

A worked example

These commands ran with OPF CLI 0.29.1, in a project set up as in the first local run. Two decks were generated without any design, decks/pilot.opf.json and decks/hiring.opf.json, each with a title in the primary color.

1. Write the brand once, as a JSON Patch that sets the whole design block:

sh
cat brand.patch.json
text
[
  { "op": "add", "path": "/design", "value": {
    "theme": "minimal",
    "fontScheme": "roboto",
    "colorScheme": { "primary": "#1F5FAD" },
    "footer": { "left": { "text": "Northwind" }, "right": { "text": "{{slide.number}} / {{deck.slideCount}}" } }
  } }
]

2. Apply it to every deck. opf edit applies the patch, checks the result and writes it back:

sh
for deck in decks/*.opf.json; do opf edit "$deck" --patch brand.patch.json -i; done

3. Check it. The brand blue looked fine in the style guide, but the validator measures it against the slide it sits on:

sh
opf validate decks/*.opf.json --fail-on warning --format text
text
decks/pilot.opf.json:8:20  warning opf/text-contrast  Coloured text colour #1F5FAD on #011842 has a contrast ratio of 2.72:1; 3:1 is needed for large text.

With the minimal theme this title slide sits on a dark background (#011842), and the blue is too dark for it. The check exits 1, so the decks would not ship.

4. Fix it in one place. Change #1F5FAD to #8CC8FF in brand.patch.json and run the same loop again. An add on an existing path replaces it, so the patch can be re-applied as often as the brand changes. Validation now passes with no warnings, and opf diff shows that the brand is the only change:

text
1 change (design: 1)

Design
  ~ design.colorScheme.primary  "#1F5FAD" -> "#8CC8FF"

5. Export. opf convert decks/pilot.opf.json pilot.pptx and opf convert decks/hiring.opf.json hiring.pdf write the files with the brand applied.

Two other ways to share a brand

  • Templates. Put the brand in a template deck with variables and fill it from data with opf fill, one deck per row. Every filled deck carries the template's design. See one template, many clients.
  • Instructions for an agent. Give the agent the design block and ask it to write only the slides, or let it write the deck and apply the patch afterwards. The second way does not depend on the agent copying the colors exactly.

Why it matters: reusable brand choices reduce repetitive formatting and make it easier for people and agents to create a coherent set of presentations.

Questions

How do I change the brand in decks that already exist?

Apply the updated patch to them, as in step 4. Because slides refer to primary rather than to a hex value, only the design block changes, and opf diff shows exactly that.

Will the brand colors pass accessibility checks?

Not necessarily, which is why the check belongs in the loop. opf validate measures text contrast against the background it actually sits on and reports a warning below the required ratio, as in step 3.

Does the brand carry into PowerPoint?

Yes. The export draws the slides with the deck's design. In the example, the .pptx has the title in #8CC8FF, text in Roboto and the Northwind footer with “1 / 2” and “2 / 2”, and the PDF embeds the same Roboto faces. Check the visual result in a preview before you send it.

Design resolution · Colors and content · Variables and footers

Download the complete example. All names and figures in these examples are illustrative.