The traditional approach (and why it doesn't scale)

Traditional document generation tools require you to set up each customer brand manually: download their logo from somewhere, upload it to the tool, enter their primary hex color, enter their secondary hex color, specify the font name for headings, specify the font name for body text. This takes 5–10 minutes per customer and requires someone to actually do it.

For a SaaS with 50 customers, that is 500 minutes of manual brand setup. For a CS team adding 2 new accounts per week, it is a recurring operational tax. And every time a customer rebrands — which happens — everything needs to be redone manually.

DocRocket's brand extraction eliminates this entirely.

What brand extraction produces

A single call to docrocket_brand_from_url returns a brand profile with:

  • Primary logo: the main logo image, as a URL, ready to embed
  • Brand colors: primary and secondary colors as hex codes (e.g., #1e3a5f, #c0392b)
  • Typography: heading font family and body font family (e.g., Neue Haas Grotesk, Georgia)
  • Company name: as it appears in the site's title or metadata

This brand profile is stored in your workspace with a brand_id. Every subsequent document generation call that passes this brand_id automatically uses these assets — no re-extraction needed.

How the extraction process works

Step 1: Render the page

We load the URL in a managed headless browser to get the fully rendered HTML, including JavaScript-driven content. This ensures we see the actual visual design the user sees, not just the static HTML.

Step 2: Identify the logo

We look for logo images using a combination of signals: the image in a <header> tag, images with "logo" in their alt text or src URL, SVG elements with brand characteristics, and the Open Graph image as a fallback. We prefer SVG (vector) logos when available for crisp rendering at any document size.

Step 3: Extract brand colors

We analyze the computed CSS of the rendered page to identify the most frequently used and visually prominent colors. We look at: background colors of major sections, text colors, link colors, and prominent UI elements (buttons, headers). We filter out near-white, near-black, and neutral grays (unless they appear to be the intentional brand palette) and return the most characteristic brand colors.

Step 4: Identify typography

We read the computed font-family CSS properties from heading elements (h1, h2) and body text, returning the actual fonts that render in the browser — including custom web fonts loaded via Google Fonts, Adobe Fonts, or self-hosted. If a font is a web font that requires loading, we note this so our document renderer can load it as well.

Step 5: Store and return

The extracted assets are stored in your DocRocket workspace and a brand_id is returned. The logo image is copied to our CDN for fast rendering in documents. Font assets are referenced or mirrored as needed.

Accuracy and edge cases

Brand extraction is highly accurate for modern marketing websites and SaaS products. A few scenarios where results may be approximate:

  • SPAs with complex loading: Sites that require interaction (login walls, complex JavaScript) before loading visual content
  • PDF-only branding: Companies whose primary brand identity is in PDFs, not their website
  • Highly minimalist sites: Sites with very limited color use (e.g., pure black and white) — extraction may not identify a distinctive "brand color"

For any of these cases, the extracted brand is fully editable in the web app at app.docrocket.ai. You can swap the logo, adjust colors, or change fonts manually after extraction.

Why this matters for multi-tenant document generation

The efficiency gain at scale is significant. A SaaS product with 100 customers that wants to offer branded PDF exports can onboard all 100 customer brands with 100 API calls — each taking under 10 seconds. That's under 15 minutes of total processing time versus 16+ hours of manual brand setup.

And when a customer rebrands, your support team doesn't need to manually update their brand assets — re-running docrocket_brand_from_url picks up the new identity automatically.

Try it: Sign up for a free trial at app.docrocket.ai, connect your AI, and run docrocket_brand_from_url("https://your-customer.com"). The extracted brand is visible in the web app within seconds.