Docsbook
← Back to catalog
creationrequires Docsbook MCP

docs-branding

Set a Docsbook workspace's brand — accent/muted colors (light + dark), Google Font, theme, logo, icon, name — by deriving values from real signals instead of inventing them. Pulls the source site's theme-color and og:image, the dominant color of the logo or icon, branding already on the workspace, and brand mentions in the README, then proposes contrast-checked palettes and asks the user to choose. Never writes a value the user did not confirm. Pair with /docs-create, /docs-setup-workspace, /docs-style-tone, or /docs-analyze.

Install & use this skill

Pick your AI client — install this single skill and call it.

1. Install
npx skills add Docsbook-io/docs-skills --skill docs-branding -a claude-code
2. Use
/docs-branding

Invoke as a slash command in chat.

Or: runtime discovery via Docsbook MCP

Already connected to the Docsbook MCP server? Skip install — ask your agent to load this skill on demand.

@docsbook find_skill "docs-branding"

docs-branding — Derive a brand, advise, then ask

This skill exists because agents reach for #3b82f6 and Arial the moment branding comes up. They invent. The whole point here is the opposite: DERIVE → ADVISE → ASK DYNAMICALLY. Find the brand signals that already exist, turn each one into a concrete, defensible recommendation, and put a real choice in front of the user before touching anything.

Workflow#

  1. Connect and read current state — run list_workspaces, resolve the target workspace, then get_workspace to read its existing branding (accent/muted colors for light + dark, base_foreground/base_background, font_family, default_theme, logo_url, icon_url, custom_name). Whatever is already set is a brand signal, not a blank slate — treat it as the starting point and the thing you must respect, not overwrite blindly.

  2. DERIVE — collect brand signals from what already exists. Never invent. Gather evidence from every source available before forming an opinion:

    • Source site (if the docs came from a website or one is known): fetch its HTML and read <meta name="theme-color">, <meta property="og:image">, favicon, and any inline CSS custom properties / --accent style tokens. The site's theme-color is the single strongest signal of the intended accent.
    • Logo / icon (logo_url, icon_url, or a file the user provides): determine the dominant non-neutral color. This is the brand's anchor color — describe it by hex.
    • Workspace already-set values from step 1 — an accent already chosen by a human outranks anything you would derive.
    • README / repo: brand name, tagline, any explicit color mentions ("our signature teal", hex codes in a style section).
    • Record each signal with its source. If a signal is missing, note it as missing — do not fill the gap with a guess.
  3. ADVISE — turn each derived fact into a concrete recommendation. Tie every suggestion to evidence, e.g. "The site's theme-color is #1E40AF and the logo sits in the same blue family, so a blue accent (#1E40AF light / #3B82F6 dark) is the honest match." Then build out the full palette from the anchor color using the methodology below:

    • Build the full palette from one brand color (see Deriving a palette) — accent → a muted companion (desaturated / neutral, not a second loud color) → base_foreground / base_background.
    • Light + dark, always — derive dark-mode variants (lightened accent so it stays legible on a dark background; near-black background, off-white foreground). A palette that only covers light mode is incomplete.
    • Check contrast (WCAG 2.1 AA) — foreground-on-background ≥ 4.5:1; accent used as a link/button against its background sufficiently contrasting. Adjust lightness until it passes; report the ratios.
    • Fit industry and audience — let the segment nudge the choice (fintech → restrained blue-greys; dev-tools → high-contrast, often dark-first; consumer → warmer, friendlier). Pick a Google Font in the same spirit (geometric sans for product/dev, humanist sans for consumer) — and only if the user wants to change it.
  4. ASK DYNAMICALLY — build the question from what you derived, and always offer three kinds of choice. Never present a single take-it-or-leave-it value. Every branding question gives the user: (a) pick one of 2–3 derived palettes with their real hex values shown; (b) type your own value; (c) send a reference — a site URL or a screenshot — which you then run back through step 2 to derive from. See The dynamic question pattern for the exact shape.

  5. Apply only after the user chooses — call update_branding with exactly the fields the user confirmed, nothing extra. Echo back what was written. If the user picked only an accent, write only accent fields; leave font, theme, logo untouched unless they were part of the choice.

  6. Report — list every field written with its final value and the signal it came from, the WCAG ratios for the chosen palette, and any signal that was missing (so the user knows what was guessed-from-context vs. derived-from-evidence — there should be none of the former).

Guardrails#

MCP Tools#

Tool Purpose
mcp__docsbook__list_workspaces Find the target workspace
mcp__docsbook__get_workspace Read current branding + logo/icon URLs as derive signals
mcp__docsbook__update_branding Write only the user-confirmed color / font / theme / logo fields

The update_branding fields you can set: accent_color, accent_color_dark, muted_color, muted_color_dark, base_foreground, base_foreground_dark, base_background, base_background_dark, font_family (Google Font name), default_theme (light/dark/system), theme_toggle, background_glow, logo_url, icon_url, custom_name. All available on the Free plan.

Deriving a palette from a logo or site#

The goal is a complete, balanced palette from a single anchor color — not a rainbow.

  1. Find the anchor. Priority: the site's theme-color → the dominant non-neutral color of the logo/icon → an explicit hex in the README. This becomes the light-mode accent.
  2. Sanity-check the accent for UI use. It will be used for links and buttons. If it is too light to read as a link on a white background, darken it until it passes (see contrast). Keep the hue; move only the lightness.
  3. Derive the muted companion. muted_color is the quiet secondary — borders, secondary text, subtle backgrounds. Take the accent's hue, drop saturation hard (toward a grey-tinted neutral), nudge lightness toward the background. It should read as "the same brand, turned down", never as a second accent competing for attention.
  4. Set foreground / background. Default to a near-black foreground (#111#1a1a1a) on a white/near-white background (#fff#fafafa) for light mode — unless the brand explicitly runs a tinted surface.
  5. Pick the font (only if changing it). Map a Google Font to the brand's character; never swap an existing font without the user asking.

Building light + dark#

Every field has a _dark twin. Derive the dark scheme from the light one rather than inventing a separate palette:

WCAG 2.1 AA contrast checklist#

Compute the contrast ratio (relative luminance per WCAG 2.1) for each pair and report the number:

If a brand's literal color fails, keep the hue and shift lightness until it passes, then tell the user the exact shade you moved to and why.

Industry and audience fit#

Use the segment to break ties between otherwise-valid palettes — never to override a real signal:

Segment Tendency Notes
Fintech / enterprise Restrained blue-greys, navy, low saturation Trust and calm over flash; muted companion does a lot of work
Dev-tools / infra High contrast, often dark-first Engineers default to dark themes — make dark mode first-class; consider default_theme: "dark" or "system"
Consumer / creator Warmer, friendlier, a touch more saturated Personality is allowed; still pass contrast
Healthcare / docs-heavy Soft, high-legibility, generous neutrals Readability beats brand expression

Font follows the same logic: geometric/grotesque sans (e.g. Inter, Geist) for product/dev surfaces, humanist sans for consumer warmth, a serif only when the brand already signals editorial. Propose, don't impose — and only when the user wants the font changed.

The dynamic question pattern#

Build the question from the derived signals, and always present all three escape hatches. Example for accent color, where the site's theme-color was #1E40AF and the logo is in the same blue:

I derived your brand from real signals:
  • Source site theme-color: #1E40AF (strongest signal)
  • Logo dominant color: #2547C0 (same blue family)
  • Workspace currently has no accent set

Here are two contrast-checked palettes built from that blue. Pick one,
type your own, or send a reference and I'll derive from it.

(a) PICK a derived palette
    1) "Brand blue"  — accent #1E40AF / dark #3B82F6 · muted #64748B / dark #475569
                       fg #111827 on bg #FFFFFF (7.0:1 ✓) · dark fg #E5E7EB on #0B0D10 (12.6:1 ✓)
    2) "Calm slate"  — accent #2547C0 / dark #5B7CFA · muted #6B7280 / dark #4B5563
                       fg #111827 on bg #FAFAFA (6.8:1 ✓) · dark fg #ECECEC on #141414 (12.1:1 ✓)

(b) TYPE YOUR OWN
    Give me a hex for the accent (e.g. #0F766E) and I'll build the full light+dark
    palette around it and check contrast before applying.

(c) SEND A REFERENCE
    Paste a website URL or drop a screenshot whose look you want, and I'll derive
    the theme-color / dominant colors from it and propose a palette.

Nothing is applied until you choose.

Reuse this shape for font and theme questions too: derive what you can, show 2–3 concrete options with their evidence, offer type-your-own, and offer send-a-reference. Apply only the user's pick.

Acceptance Criteria#

View source on GitHub →Browse full catalog repo →
Keywords
brandingcolorspalettelogothemefontaccentdesign
MCP tools used
list_workspacesget_workspaceupdate_branding