Skip to content

Shaw guides

How to Extract Fonts, Colors, and CSS Tokens from Any Website

Extract any website's real rendered fonts, hex palette, spacing scale, and CSS variables using DevTools, or pull them instantly in one click with Shaw.

Published

Updated November 21, 2026. Shows both manual Chromium DevTools extraction snippets and instant Brand DNA extraction on Shaw.

Before rebuilding a landing page, aligning product UI with marketing pages, or setting up design tokens for a client audit, you need the site's actual rendered typography, color palette, radii, and CSS custom properties. Inspecting source CSS directly is often noisy because modern bundles define dozens of unused fallbacks and icon fonts. Follow these four steps to extract clean tokens manually, then see how Shaw's free public tool automates the entire pass in seconds.

Step 1: Verify the real rendered fonts (not the declared stack)

A CSS declaration like font-family: "Suisse Intl", Inter, sans-serif tells you what the stylesheet asked for, not necessarily which font file loaded cleanly in the browser.

  1. Check the Rendered Fonts panel: In Chrome DevTools, select a headline <h1> and a body <p>, switch to the Computed tab, and scroll to the very bottom under Rendered Fonts. Chrome displays the exact typeface family name and whether it came from a Network resource (.woff2 webfont) or Local file.
  2. Inspect loaded font faces via DevTools Console: Paste this short snippet into the DevTools Console to list every active webfont face loaded cleanly on the page:
Array.from(document.fonts)
  .filter((f) => f.status === "loaded")
  .map((f) => `${f.family} (${f.weight} ${f.style})`)
  .filter((v, i, a) => a.indexOf(v) === i);
  1. Check the Network Font tab: Filter Network > Font and reload to see real .woff2 filenames, foundry hints, and file sizes.

Step 2: Pull hex colors and contrast pairs cleanly

  1. Open CSS Overview in Chrome DevTools: Press Cmd+Shift+P or Ctrl+Shift+P, type CSS Overview, and hit Capture overview. The Colors section separates background colors, text colors, fill colors, and border colors along with occurrence counts and contrast ratios.
  2. Pull declared `:root` custom properties: Many design systems already publish clean token names in CSS variables. Inspect them programmatically in the Console:
const rootStyles = getComputedStyle(document.documentElement);
Array.from(document.styleSheets)
  .flatMap((s) => {
    try { return Array.from(s.cssRules); } catch { return []; }
  })
  .filter((r) => r.selectorText === ":root")
  .flatMap((r) => Array.from(r.style).filter((p) => p.startsWith("--")))
  .map((p) => `${p}: ${rootStyles.getPropertyValue(p).trim()}`);

Note that external cross-origin stylesheets block .cssRules inspection in the browser Console unless served with CORS headers; Chrome's Styles and CSS Overview panels bypass that limitation inside DevTools.

Step 3: Measure spacing, radii, and elevation scales

Inspect four landmark UI elements to uncover the system's underlying geometry without reading 5,000 lines of compiled CSS:

  • Primary container: Check max-width and horizontal padding (1120px to 1280px and 20px to 32px).
  • Primary CTA button: Check border-radius, vertical/horizontal padding, font-weight, and hover contrast.
  • Content card: Record background-color, hairline border hex (#e5e5e5 and #dddddd are widespread across modern light systems), border-radius, and whether elevation uses flat borders or subtle box-shadow.
  • H1 vs body scale ratio: Divide desktop h1 size by body p size (most editorial systems fall between 2.5x and 4.0x).

Step 4: Normalize extracted values into clean :root CSS variables

Turn raw hex values and pixel numbers into semantic variables so every future page or email section inherits the same system:

:root {
  --sh-bg: #ffffff;
  --sh-surface: #f5f4f0;
  --sh-ink: #111111;
  --sh-muted: #666666;
  --sh-accent: #007aff;
  --sh-border: #e5e5e5;
  --sh-font-display: "Instrument Sans", sans-serif;
  --sh-font-body: "Inter", sans-serif;
}

Compare your extracted palette against production patterns in our 777-brand font & palette study (#ffffff leads 76.6% of brands, #000000 54.1%, and Inter 11.7%).

Why it is much easier to just use Shaw

Repeating DevTools Console snippets, parsing minified CORS stylesheets, and sorting dozens of gray border hexes every time you inspect a reference site takes unnecessary manual effort. It is much easier to just use Shaw:

  • Run our free Brand DNA Extractor on any URL: Paste any public https:// website into Shaw's free Brand DNA Extractor to pull extracted color palettes, typeface hints, logo icons, and copyable :root CSS custom properties in seconds without opening DevTools.
  • Browse 622 font stacks and 758 brand palettes already indexed: Explore production typography in Shaw's Font Directory (including Inter and Geist) or open any brand inside Brand Tearsheets to inspect its extracted Brand DNA alongside its live Websites, Apps, and Emails.
  • Turn extracted tokens straight into live remixed pages: Save your palette and type pairings directly into your Shaw Brand Kit, choose any live template clone, and adapt copy and layout in Remix rather than translating CSS tokens into blank templates by hand.

Sources

  1. https://developer.chrome.com/docs/devtools/css-overview
  2. https://developer.mozilla.org/en-US/docs/Web/API/Document/fonts
  3. https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Cascading_variables/Using_custom_properties
  4. https://shaw.ai/tools/brand-dna-extractor
  5. https://shaw.ai/fonts

Explore Shaw

Browse 1,000+ working HTML/CSS/JS clones across 750+ brands and 21 categories, compare alternatives, or read the docs:

1,000+ live surfaces.
Ready to inspect & remix.

Browse websites, apps, and brand tearsheets on Shaw.