[{"data":1,"prerenderedAt":2566},["ShallowReactive",2],{"api-blog-design-token-types-reference":3,"api-blog-related-design-token-types-reference":665},{"id":4,"title":5,"author":6,"body":7,"category":633,"date":634,"dateModified":635,"description":636,"extension":637,"faqs":638,"image":635,"meta":649,"navigation":650,"path":651,"readingTime":652,"relatedSlugs":653,"seo":657,"stem":658,"tags":659,"__hash__":664},"apiBlog/api-blog/design-token-types-reference.md","Design Token Types: Every Token a Website Exposes (Reference)","Soraia",{"type":8,"value":9,"toc":621},"minimark",[10,14,23,28,400,404,411,423,429,439,443,450,500,568,572,577,580,584,587,591,594,598,617],[11,12,13],"p",{},"This is the reference we wish had existed when we built our extraction engine: every token type a live website exposes, the CSS properties each one comes from, and the gotcha that silently corrupts it. Seventeen groups, one table each way.",[11,15,16,17,22],{},"If you want the extraction code itself, that is in the ",[18,19,21],"a",{"href":20},"/api/blog/how-to-extract-design-tokens-from-any-website-in-python","Python tokens guide",". This page is the map.",[24,25,27],"h2",{"id":26},"the-complete-token-table","The complete token table",[29,30,31,50],"table",{},[32,33,34],"thead",{},[35,36,37,41,44,47],"tr",{},[38,39,40],"th",{},"Token group",[38,42,43],{},"CSS sources",[38,45,46],{},"What good output looks like",[38,48,49],{},"The gotcha",[51,52,53,84,110,126,146,170,186,208,230,253,269,285,301,317,339,364,383],"tbody",{},[35,54,55,59,78,81],{},[56,57,58],"td",{},"Colors",[56,60,61,65,66,65,69,65,72,65,75],{},[62,63,64],"code",{},"color",", ",[62,67,68],{},"background-color",[62,70,71],{},"border-*-color",[62,73,74],{},"fill",[62,76,77],{},"stroke",[56,79,80],{},"5-12 ranked values, not 200",[56,82,83],{},"Browser defaults and cookie banners pollute counts",[35,85,86,89,97,104],{},[56,87,88],{},"Gradients",[56,90,91,65,94],{},[62,92,93],{},"background-image",[62,95,96],{},"mask-image",[56,98,99,100,103],{},"Full ",[62,101,102],{},"linear-gradient(...)"," strings",[56,105,106,107,109],{},"Not in ",[62,108,68],{}," - miss this and gradient brands report as white",[35,111,112,115,120,123],{},[56,113,114],{},"Font families",[56,116,117],{},[62,118,119],{},"font-family",[56,121,122],{},"1-3 families with roles (heading/body/mono)",[56,124,125],{},"The stack lists what CSS asked for, not what loaded",[35,127,128,131,136,139],{},[56,129,130],{},"Font sizes",[56,132,133],{},[62,134,135],{},"font-size",[56,137,138],{},"A scale: 12, 14, 16, 20, 24, 36, 56",[56,140,141,142,145],{},"Fluid ",[62,143,144],{},"clamp()"," values resolve differently per viewport",[35,147,148,151,156,159],{},[56,149,150],{},"Font weights",[56,152,153],{},[62,154,155],{},"font-weight",[56,157,158],{},"3-5 weights actually used",[56,160,161,162,165,166,169],{},"Keyword values (",[62,163,164],{},"bold",") and numbers (",[62,167,168],{},"700",") need normalizing",[35,171,172,175,180,183],{},[56,173,174],{},"Line heights",[56,176,177],{},[62,178,179],{},"line-height",[56,181,182],{},"Unitless ratios per size tier",[56,184,185],{},"Computed styles return px; divide by font-size to recover the ratio",[35,187,188,191,196,203],{},[56,189,190],{},"Letter spacing",[56,192,193],{},[62,194,195],{},"letter-spacing",[56,197,198,199,202],{},"Tight values on headings, ",[62,200,201],{},"normal"," elsewhere",[56,204,205,207],{},[62,206,201],{}," is a value, not an absence",[35,209,210,213,224,227],{},[56,211,212],{},"Spacing",[56,214,215,65,218,65,221],{},[62,216,217],{},"margin",[62,219,220],{},"padding",[62,222,223],{},"gap",[56,225,226],{},"A grid: 4, 8, 12, 16, 24, 32, 48, 64",[56,228,229],{},"Snap to the base unit or you get 40 near-duplicates",[35,231,232,235,240,243],{},[56,233,234],{},"Border radii",[56,236,237],{},[62,238,239],{},"border-radius",[56,241,242],{},"2-4 values (subtle, card, pill)",[56,244,245,248,249,252],{},[62,246,247],{},"9999px"," and ",[62,250,251],{},"50%"," are the same intent, different strings",[35,254,255,258,263,266],{},[56,256,257],{},"Border widths",[56,259,260],{},[62,261,262],{},"border-width",[56,264,265],{},"1-2 values",[56,267,268],{},"Mostly 1px everywhere; the outliers are the signal",[35,270,271,274,279,282],{},[56,272,273],{},"Box shadows",[56,275,276],{},[62,277,278],{},"box-shadow",[56,280,281],{},"2-4 elevation levels",[56,283,284],{},"Multi-layer shadows are one token, not four",[35,286,287,290,295,298],{},[56,288,289],{},"Text shadows",[56,291,292],{},[62,293,294],{},"text-shadow",[56,296,297],{},"Usually empty; notable when not",[56,299,300],{},"Rare enough that any hit is worth keeping",[35,302,303,306,311,314],{},[56,304,305],{},"Opacities",[56,307,308],{},[62,309,310],{},"opacity",[56,312,313],{},"Disabled/overlay/hover steps",[56,315,316],{},"Transition intermediate values sneak in if you sample mid-animation",[35,318,319,322,330,333],{},[56,320,321],{},"Durations",[56,323,324,65,327],{},[62,325,326],{},"transition-duration",[62,328,329],{},"animation-duration",[56,331,332],{},"150ms/300ms/500ms tiers",[56,334,335,338],{},[62,336,337],{},"0s"," is a default, not a token",[35,340,341,344,352,358],{},[56,342,343],{},"Easings",[56,345,346,65,349],{},[62,347,348],{},"transition-timing-function",[62,350,351],{},"animation-timing-function",[56,353,354,355],{},"The brand's ",[62,356,357],{},"cubic-bezier(...)",[56,359,360,363],{},[62,361,362],{},"ease"," defaults drown the custom curves - filter them",[35,365,366,369,374,377],{},[56,367,368],{},"Z-index layers",[56,370,371],{},[62,372,373],{},"z-index",[56,375,376],{},"The layering scale: 10, 50, 100, 9999",[56,378,379,382],{},[62,380,381],{},"auto"," everywhere except the 5 values that matter",[35,384,385,388,394,397],{},[56,386,387],{},"Breakpoints",[56,389,390,393],{},[62,391,392],{},"@media"," conditions",[56,395,396],{},"3-5 widths: 640, 768, 1024, 1280",[56,398,399],{},"Only visible in stylesheets - computed styles never expose them",[24,401,403],{"id":402},"the-same-table-by-extraction-difficulty","The same table, by extraction difficulty",[11,405,406,410],{},[407,408,409],"strong",{},"Free (one property read):"," colors, font families, font sizes, font weights, opacities, z-index.",[11,412,413,416,417,419,420,422],{},[407,414,415],{},"Needs normalizing:"," line heights (px to ratio), spacing (grid snapping), radii (",[62,418,247],{}," = ",[62,421,251],{}," = pill), weights (keywords to numbers), shadows (multi-layer grouping).",[11,424,425,428],{},[407,426,427],{},"Needs the stylesheet, not computed styles:"," breakpoints, and any media-query variant of everything else. This is the structural reason a computed-styles-only extractor reports one viewport and calls it the design system.",[11,430,431,434,435,438],{},[407,432,433],{},"Needs judgment:"," which color is ",[62,436,437],{},"primary"," (frequency plus element context - what is on the buttons), which durations are intentional vs defaults, which fonts actually loaded.",[24,440,442],{"id":441},"how-this-maps-to-the-api","How this maps to the API",[11,444,445,446,449],{},"Every group in the table is a field on our extract endpoint, selectable with ",[62,447,448],{},"?fields=",":",[451,452,457],"pre",{"className":453,"code":454,"language":455,"meta":456,"style":456},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl \"https://miromiro.app/api/v1/extract?url=stripe.com&fields=colors,spacing,easings\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n","bash","",[62,458,459,483],{"__ignoreMap":456},[460,461,464,468,472,476,479],"span",{"class":462,"line":463},"line",1,[460,465,467],{"class":466},"sBMFI","curl",[460,469,471],{"class":470},"sMK4o"," \"",[460,473,475],{"class":474},"sfazB","https://miromiro.app/api/v1/extract?url=stripe.com&fields=colors,spacing,easings",[460,477,478],{"class":470},"\"",[460,480,482],{"class":481},"sTEyZ"," \\\n",[460,484,486,489,491,494,497],{"class":462,"line":485},2,[460,487,488],{"class":474},"  -H",[460,490,471],{"class":470},[460,492,493],{"class":474},"Authorization: Bearer ",[460,495,496],{"class":481},"$MIROMIRO_API_KEY",[460,498,499],{"class":470},"\"\n",[11,501,502,503,65,506,65,509,65,512,65,515,65,518,65,521,65,524,65,527,65,530,65,533,65,536,65,539,65,542,65,545,65,548,65,551,554,555,558,559,562,563,567],{},"The full field list: ",[62,504,505],{},"colors",[62,507,508],{},"gradients",[62,510,511],{},"fontFamilies",[62,513,514],{},"fontSizes",[62,516,517],{},"fontWeights",[62,519,520],{},"lineHeights",[62,522,523],{},"letterSpacings",[62,525,526],{},"spacing",[62,528,529],{},"borderRadiuses",[62,531,532],{},"borderWidths",[62,534,535],{},"boxShadows",[62,537,538],{},"textShadows",[62,540,541],{},"opacities",[62,543,544],{},"durations",[62,546,547],{},"easings",[62,549,550],{},"zIndexes",[62,552,553],{},"breakpoints",". Add ",[62,556,557],{},"format=css"," or ",[62,560,561],{},"format=tailwind"," to get the same data as custom properties or a theme block instead of JSON. One call is 10 credits; ",[18,564,566],{"href":565},"/api/dashboard/keys","100 credits a month are free",", no card.",[24,569,571],{"id":570},"frequently-asked-questions","Frequently asked questions",[573,574,576],"h3",{"id":575},"what-are-the-main-types-of-design-tokens","What are the main types of design tokens?",[11,578,579],{},"Color, typography (families/sizes/weights/line heights/letter spacing), spacing, borders (radii/widths), effects (shadows/gradients/opacities), motion (durations/easings), and structure (z-index, breakpoints). Seventeen groups in total from a live site.",[573,581,583],{"id":582},"are-css-custom-properties-the-same-as-design-tokens","Are CSS custom properties the same as design tokens?",[11,585,586],{},"No. Custom properties are one storage format. Tailwind and CSS-in-JS sites often ship almost none while having rigorous token systems. Extract resolved values, not variable names.",[573,588,590],{"id":589},"which-tokens-matter-most","Which tokens matter most?",[11,592,593],{},"Colors, type scale, spacing - in that order. They carry the identity. Radii, shadows, and motion are what make a rebuild feel like the original instead of a wireframe of it.",[573,595,597],{"id":596},"can-i-extract-motion-tokens-from-a-website","Can I extract motion tokens from a website?",[11,599,600,601,65,603,605,606,608,609,611,612,248,614,616],{},"Yes: ",[62,602,326],{},[62,604,329],{},", and their timing functions. Filter out ",[62,607,337],{}," and default ",[62,610,362],{}," or the real values drown. Our extract endpoint returns them as ",[62,613,544],{},[62,615,547],{},".",[618,619,620],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":456,"searchDepth":485,"depth":485,"links":622},[623,624,625,626],{"id":26,"depth":485,"text":27},{"id":402,"depth":485,"text":403},{"id":441,"depth":485,"text":442},{"id":570,"depth":485,"text":571,"children":627},[628,630,631,632],{"id":575,"depth":629,"text":576},3,{"id":582,"depth":629,"text":583},{"id":589,"depth":629,"text":590},{"id":596,"depth":629,"text":597},"Reference","2026-07-18",null,"All 17 design token types a website exposes - the CSS properties each comes from, what good output looks like, and the gotcha that silently corrupts it.","md",[639,641,644,646],{"question":576,"answer":640},"Color tokens, typography tokens (families, sizes, weights, line heights, letter spacing), spacing tokens, border tokens (radii, widths), effect tokens (shadows, gradients, opacities), motion tokens (durations, easings), and structural tokens (z-index layers, breakpoints). A complete extraction from a live site covers around 17 distinct groups.",{"question":642,"answer":643},"Which CSS properties do design tokens come from?","Each token group maps to specific CSS properties: colors from color, background-color and border-color; the type scale from font-size; spacing from margin, padding and gap; radii from border-radius; shadows from box-shadow; motion from transition-duration, animation-duration and their timing functions; breakpoints from media query conditions.",{"question":583,"answer":645},"No. Custom properties are one way a site stores tokens. Many production sites - especially Tailwind and CSS-in-JS codebases - ship few or no custom properties while still having a rigorous token system. Extract from resolved values, not variable names, or you will miss most real-world systems.",{"question":647,"answer":648},"What order should I extract tokens in?","Colors, type scale, and spacing first - they carry most of a site's identity and are enough to theme a rough UI. Radii, shadows, and motion are the polish layer that makes a rebuild feel like the original.",{},true,"/api-blog/design-token-types-reference",6,[654,655,656],"how-to-extract-design-tokens-from-any-website-in-python","best-design-token-extraction-tools-2026","how-to-detect-fonts-a-website-uses",{"title":5,"description":636},"api-blog/design-token-types-reference",[660,661,662,663],"design tokens","reference","css","cheatsheet","Q2H5fOPEU9oXwkGDkaF1v9diKxKTdrdCh3xo9PqdAaM",[666,1388,1822],{"id":667,"title":668,"author":6,"body":669,"category":1366,"date":634,"dateModified":635,"description":1367,"extension":637,"faqs":1368,"image":635,"meta":1378,"navigation":650,"path":1379,"readingTime":764,"relatedSlugs":1380,"seo":1383,"stem":1384,"tags":1385,"__hash__":1387},"apiBlog/api-blog/how-to-extract-design-tokens-from-any-website-in-python.md","How to Extract Design Tokens from Any Website in Python",{"type":8,"value":670,"toc":1350},[671,678,681,685,688,714,717,915,918,926,941,945,948,987,990,994,997,1035,1039,1042,1104,1108,1189,1196,1200,1203,1233,1255,1266,1270,1280,1282,1286,1289,1293,1306,1310,1313,1317,1320,1324,1347],[11,672,673,674,677],{},"The fastest way to extract design tokens from a website in Python is Playwright plus ",[62,675,676],{},"getComputedStyle()",": load the page in a real browser, collect the computed styles of every element, and count what repeats. The counting is the important part. A site's design system is whatever it uses everywhere, not every value that appears once in a forgotten footer.",[11,679,680],{},"Parsing CSS files without a browser is the approach most tutorials suggest, and it is the one that works worst on modern sites. More on that below.",[24,682,684],{"id":683},"extract-colors-with-playwright","Extract colors with Playwright",[11,686,687],{},"First, install Playwright and a browser:",[451,689,691],{"className":453,"code":690,"language":455,"meta":456,"style":456},"pip install playwright\nplaywright install chromium\n",[62,692,693,704],{"__ignoreMap":456},[460,694,695,698,701],{"class":462,"line":463},[460,696,697],{"class":466},"pip",[460,699,700],{"class":474}," install",[460,702,703],{"class":474}," playwright\n",[460,705,706,709,711],{"class":462,"line":485},[460,707,708],{"class":466},"playwright",[460,710,700],{"class":474},[460,712,713],{"class":474}," chromium\n",[11,715,716],{},"Then collect styles from every element and count them:",[451,718,722],{"className":719,"code":720,"language":721,"meta":456,"style":456},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from collections import Counter\nfrom playwright.sync_api import sync_playwright\n\nCOLLECT = \"\"\"\n() => {\n  const els = [...document.querySelectorAll('body *')].slice(0, 5000);\n  const out = { colors: [], fonts: [], sizes: [], radii: [], shadows: [] };\n  for (const el of els) {\n    const s = getComputedStyle(el);\n    out.colors.push(s.color, s.backgroundColor, s.borderTopColor);\n    out.fonts.push(s.fontFamily);\n    out.sizes.push(s.fontSize);\n    out.radii.push(s.borderTopLeftRadius);\n    out.shadows.push(s.boxShadow);\n  }\n  return out;\n}\n\"\"\"\n\ndef top(values, n=8, skip=(\"\", \"none\", \"normal\", \"auto\", \"0px\", \"rgba(0, 0, 0, 0)\")):\n    return Counter(v for v in values if v not in skip).most_common(n)\n\nwith sync_playwright() as p:\n    browser = p.chromium.launch()\n    page = browser.new_page(viewport={\"width\": 1440, \"height\": 900})\n    page.goto(\"https://stripe.com\", wait_until=\"networkidle\")\n    raw = page.evaluate(COLLECT)\n    browser.close()\n\nfor name in (\"colors\", \"fonts\", \"sizes\", \"radii\", \"shadows\"):\n    print(f\"\\n== {name} ==\")\n    for value, count in top(raw[name]):\n        print(f\"{count:>5}  {value}\")\n","python",[62,723,724,729,734,739,745,751,756,762,768,774,780,786,792,798,804,810,816,822,828,833,839,845,850,856,862,868,874,880,886,891,897,903,909],{"__ignoreMap":456},[460,725,726],{"class":462,"line":463},[460,727,728],{},"from collections import Counter\n",[460,730,731],{"class":462,"line":485},[460,732,733],{},"from playwright.sync_api import sync_playwright\n",[460,735,736],{"class":462,"line":629},[460,737,738],{"emptyLinePlaceholder":650},"\n",[460,740,742],{"class":462,"line":741},4,[460,743,744],{},"COLLECT = \"\"\"\n",[460,746,748],{"class":462,"line":747},5,[460,749,750],{},"() => {\n",[460,752,753],{"class":462,"line":652},[460,754,755],{},"  const els = [...document.querySelectorAll('body *')].slice(0, 5000);\n",[460,757,759],{"class":462,"line":758},7,[460,760,761],{},"  const out = { colors: [], fonts: [], sizes: [], radii: [], shadows: [] };\n",[460,763,765],{"class":462,"line":764},8,[460,766,767],{},"  for (const el of els) {\n",[460,769,771],{"class":462,"line":770},9,[460,772,773],{},"    const s = getComputedStyle(el);\n",[460,775,777],{"class":462,"line":776},10,[460,778,779],{},"    out.colors.push(s.color, s.backgroundColor, s.borderTopColor);\n",[460,781,783],{"class":462,"line":782},11,[460,784,785],{},"    out.fonts.push(s.fontFamily);\n",[460,787,789],{"class":462,"line":788},12,[460,790,791],{},"    out.sizes.push(s.fontSize);\n",[460,793,795],{"class":462,"line":794},13,[460,796,797],{},"    out.radii.push(s.borderTopLeftRadius);\n",[460,799,801],{"class":462,"line":800},14,[460,802,803],{},"    out.shadows.push(s.boxShadow);\n",[460,805,807],{"class":462,"line":806},15,[460,808,809],{},"  }\n",[460,811,813],{"class":462,"line":812},16,[460,814,815],{},"  return out;\n",[460,817,819],{"class":462,"line":818},17,[460,820,821],{},"}\n",[460,823,825],{"class":462,"line":824},18,[460,826,827],{},"\"\"\"\n",[460,829,831],{"class":462,"line":830},19,[460,832,738],{"emptyLinePlaceholder":650},[460,834,836],{"class":462,"line":835},20,[460,837,838],{},"def top(values, n=8, skip=(\"\", \"none\", \"normal\", \"auto\", \"0px\", \"rgba(0, 0, 0, 0)\")):\n",[460,840,842],{"class":462,"line":841},21,[460,843,844],{},"    return Counter(v for v in values if v not in skip).most_common(n)\n",[460,846,848],{"class":462,"line":847},22,[460,849,738],{"emptyLinePlaceholder":650},[460,851,853],{"class":462,"line":852},23,[460,854,855],{},"with sync_playwright() as p:\n",[460,857,859],{"class":462,"line":858},24,[460,860,861],{},"    browser = p.chromium.launch()\n",[460,863,865],{"class":462,"line":864},25,[460,866,867],{},"    page = browser.new_page(viewport={\"width\": 1440, \"height\": 900})\n",[460,869,871],{"class":462,"line":870},26,[460,872,873],{},"    page.goto(\"https://stripe.com\", wait_until=\"networkidle\")\n",[460,875,877],{"class":462,"line":876},27,[460,878,879],{},"    raw = page.evaluate(COLLECT)\n",[460,881,883],{"class":462,"line":882},28,[460,884,885],{},"    browser.close()\n",[460,887,889],{"class":462,"line":888},29,[460,890,738],{"emptyLinePlaceholder":650},[460,892,894],{"class":462,"line":893},30,[460,895,896],{},"for name in (\"colors\", \"fonts\", \"sizes\", \"radii\", \"shadows\"):\n",[460,898,900],{"class":462,"line":899},31,[460,901,902],{},"    print(f\"\\n== {name} ==\")\n",[460,904,906],{"class":462,"line":905},32,[460,907,908],{},"    for value, count in top(raw[name]):\n",[460,910,912],{"class":462,"line":911},33,[460,913,914],{},"        print(f\"{count:>5}  {value}\")\n",[11,916,917],{},"Run it and you get something like:",[451,919,924],{"className":920,"code":922,"language":923},[921],"language-text","== colors ==\n 3021  rgb(255, 255, 255)\n 1204  rgb(26, 27, 37)\n  412  rgb(99, 91, 255)\n  118  rgb(66, 84, 102)\n","text",[62,925,922],{"__ignoreMap":456},[11,927,928,929,932,933,936,937,940],{},"That third line is the brand color, found by nothing smarter than counting. ",[62,930,931],{},"getComputedStyle"," has already done the hard work for you: it resolved every CSS variable chain, every ",[62,934,935],{},"var(--a, var(--b))"," fallback, every cascade conflict, and turned Tailwind utility soup into plain ",[62,938,939],{},"rgb()"," values.",[24,942,944],{"id":943},"fonts-and-the-type-scale","Fonts and the type scale",[11,946,947],{},"The same collection already has them. Font families come back as full stacks, so take the first entry:",[451,949,951],{"className":719,"code":950,"language":721,"meta":456,"style":456},"families = Counter(f.split(\",\")[0].strip('\"\\' ') for f in raw[\"fonts\"])\nprint(families.most_common(5))\n\nsizes = sorted(\n    {float(s.replace(\"px\", \"\")) for s, c in top(raw[\"sizes\"], n=20)},\n)\nprint(sizes)  # e.g. [12.0, 14.0, 16.0, 18.0, 20.0, 24.0, 36.0, 56.0]\n",[62,952,953,958,963,967,972,977,982],{"__ignoreMap":456},[460,954,955],{"class":462,"line":463},[460,956,957],{},"families = Counter(f.split(\",\")[0].strip('\"\\' ') for f in raw[\"fonts\"])\n",[460,959,960],{"class":462,"line":485},[460,961,962],{},"print(families.most_common(5))\n",[460,964,965],{"class":462,"line":629},[460,966,738],{"emptyLinePlaceholder":650},[460,968,969],{"class":462,"line":741},[460,970,971],{},"sizes = sorted(\n",[460,973,974],{"class":462,"line":747},[460,975,976],{},"    {float(s.replace(\"px\", \"\")) for s, c in top(raw[\"sizes\"], n=20)},\n",[460,978,979],{"class":462,"line":652},[460,980,981],{},")\n",[460,983,984],{"class":462,"line":758},[460,985,986],{},"print(sizes)  # e.g. [12.0, 14.0, 16.0, 18.0, 20.0, 24.0, 36.0, 56.0]\n",[11,988,989],{},"That sorted list is the site's type scale. If it has fifteen entries instead of seven, you are looking at a site without a design system, which is also useful to know.",[24,991,993],{"id":992},"from-raw-values-to-actual-tokens","From raw values to actual tokens",[11,995,996],{},"Raw counts are not tokens yet. Three cleanup steps matter:",[998,999,1000,1011,1023],"ol",{},[1001,1002,1003,1006,1007,1010],"li",{},[407,1004,1005],{},"Drop the defaults."," ",[62,1008,1009],{},"rgb(0, 0, 0)"," near the top does not mean the brand is black. Browser resets and inherited defaults pollute every element, so check whether a value actually appears on visible, styled elements before promoting it.",[1001,1012,1013,1006,1016,248,1019,1022],{},[407,1014,1015],{},"Merge near-duplicates.",[62,1017,1018],{},"rgb(99, 91, 255)",[62,1020,1021],{},"rgb(99, 92, 255)"," are the same token with a rounding disagreement. Snap channels to a small tolerance before counting, or you will split one token's count across five entries.",[1001,1024,1025,1028,1029,1031,1032,1034],{},[407,1026,1027],{},"Name by role, not by value."," The most frequent saturated color on buttons and links is ",[62,1030,437],{},". The dominant text color is ",[62,1033,923],{},". Frequency plus element context gets you there; k-means clustering is overkill for this and I would skip it.",[24,1036,1038],{"id":1037},"common-problems","Common problems",[11,1040,1041],{},"Real gotchas, in the order they will bite you:",[1043,1044,1045,1055,1061,1077,1090],"ul",{},[1001,1046,1047,1050,1051,1054],{},[407,1048,1049],{},"Your viewport is a filter."," Computed styles reflect the current viewport only. A ",[62,1052,1053],{},"@media (max-width: 640px)"," override is invisible at 1440px. Extract at two viewports (mobile and desktop) if you care about responsive tokens.",[1001,1056,1057,1060],{},[407,1058,1059],{},"Cookie banners poison the palette."," Consent overlays and chat widgets bring their own colors and fonts, and they are often thousands of DOM nodes. Dismiss them or exclude their containers before collecting.",[1001,1062,1063,1006,1066,1068,1069,1072,1073,1076],{},[407,1064,1065],{},"Fonts can lie.",[62,1067,119],{}," lists what CSS asked for, not what loaded. With ",[62,1070,1071],{},"font-display: swap"," the brand font may never arrive in a headless run. Await ",[62,1074,1075],{},"document.fonts.ready"," before collecting if exact loaded fonts matter.",[1001,1078,1079,1085,1086,1089],{},[407,1080,1081,1082,616],{},"Gradients are not in ",[62,1083,1084],{},"backgroundColor"," They live in ",[62,1087,1088],{},"backgroundImage",". If a brand is gradient-heavy, collect that property too or you will report their hero as plain white.",[1001,1091,1092,1095,1096,1099,1100,1103],{},[407,1093,1094],{},"Shadow DOM and iframes are invisible"," to ",[62,1097,1098],{},"querySelectorAll",". Web-component-heavy sites need you to walk ",[62,1101,1102],{},"shadowRoot","s explicitly.",[24,1105,1107],{"id":1106},"diy-vs-parsing-css-vs-an-api","DIY vs parsing CSS vs an API",[29,1109,1110,1132],{},[32,1111,1112],{},[35,1113,1114,1117,1120,1123,1126,1129],{},[38,1115,1116],{},"Approach",[38,1118,1119],{},"Tailwind / utility CSS",[38,1121,1122],{},"Runtime CSS-in-JS",[38,1124,1125],{},"Resolves var() and cascade",[38,1127,1128],{},"Media queries",[38,1130,1131],{},"Maintenance",[51,1133,1134,1152,1171],{},[35,1135,1136,1139,1142,1144,1146,1149],{},[56,1137,1138],{},"Playwright + computed styles (this guide)",[56,1140,1141],{},"Yes",[56,1143,1141],{},[56,1145,1141],{},[56,1147,1148],{},"Current viewport only",[56,1150,1151],{},"Browser infra is yours to run",[35,1153,1154,1157,1160,1163,1165,1168],{},[56,1155,1156],{},"Parse CSS files yourself (tinycss2, no browser)",[56,1158,1159],{},"Painful",[56,1161,1162],{},"No",[56,1164,1162],{},[56,1166,1167],{},"Declared, but unused values included",[56,1169,1170],{},"Low, but wrong on modern sites",[35,1172,1173,1176,1178,1181,1183,1186],{},[56,1174,1175],{},"MiroMiro extract API",[56,1177,1141],{},[56,1179,1180],{},"No (static HTML + CSS, no JS execution)",[56,1182,1141],{},[56,1184,1185],{},"Yes, all declared breakpoints",[56,1187,1188],{},"None",[11,1190,1191,1192,1195],{},"Use the Playwright approach if you are extracting from a handful of sites, need runtime-injected styles, and want full control. Skip the hand-rolled CSS-parsing route: resolving the cascade, specificity, and nested ",[62,1193,1194],{},"var()"," fallbacks yourself is a project, not a script.",[24,1197,1199],{"id":1198},"or-use-one-api-call","Or use one API call",[11,1201,1202],{},"The dedupe, the ranking, the var() chains, the resets, and every declared breakpoint - that is what our extract endpoint does for a living:",[451,1204,1206],{"className":453,"code":1205,"language":455,"meta":456,"style":456},"curl \"https://miromiro.app/api/v1/extract?url=stripe.com\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n",[62,1207,1208,1221],{"__ignoreMap":456},[460,1209,1210,1212,1214,1217,1219],{"class":462,"line":463},[460,1211,467],{"class":466},[460,1213,471],{"class":470},[460,1215,1216],{"class":474},"https://miromiro.app/api/v1/extract?url=stripe.com",[460,1218,478],{"class":470},[460,1220,482],{"class":481},[460,1222,1223,1225,1227,1229,1231],{"class":462,"line":485},[460,1224,488],{"class":474},[460,1226,471],{"class":470},[460,1228,493],{"class":474},[460,1230,496],{"class":481},[460,1232,499],{"class":470},[11,1234,1235,1236,65,1238,65,1240,65,1242,65,1244,65,1246,65,1248,1250,1251,1254],{},"The JSON response has ",[62,1237,505],{},[62,1239,511],{},[62,1241,514],{},[62,1243,517],{},[62,1245,526],{},[62,1247,529],{},[62,1249,535],{},", and more, already deduped and ranked. Trim it with ",[62,1252,1253],{},"?fields=colors,spacing"," if you only need part of it.",[11,1256,1257,1258,1261,1262,616],{},"If your script from this guide breaks on some site's cookie banner at 2am, that is roughly the moment an API earns its keep. You can ",[18,1259,1260],{"href":565},"get a free API key"," with 100 credits a month, no card, or try it without signing up in the ",[18,1263,1265],{"href":1264},"/api/demo","playground",[24,1267,1269],{"id":1268},"summary","Summary",[11,1271,1272,1273,1275,1276,1279],{},"Playwright plus ",[62,1274,931],{}," plus a ",[62,1277,1278],{},"Counter"," is the honest way to extract design tokens in Python, and the frequency counting matters more than any clever clustering. Parse-the-CSS approaches are not worth your time on modern sites. I hope this saved you a debugging evening.",[24,1281,571],{"id":570},[573,1283,1285],{"id":1284},"can-i-extract-design-tokens-without-a-headless-browser","Can I extract design tokens without a headless browser?",[11,1287,1288],{},"You can parse the site's CSS with a library like tinycss2, but on modern sites this works badly: CSS-in-JS generates styles at runtime, Tailwind buries the palette in utility classes, and you cannot tell which declared values are actually used. Computed styles from a real browser are the ground truth.",[573,1290,1292],{"id":1291},"how-do-i-extract-tokens-from-a-tailwind-site-where-everything-is-utility-classes","How do I extract tokens from a Tailwind site where everything is utility classes?",[11,1294,1295,1296,1298,1299,1095,1302,1305],{},"Ignore the class names entirely and read computed styles. ",[62,1297,931],{}," resolves ",[62,1300,1301],{},"bg-indigo-600",[62,1303,1304],{},"rgb(79, 70, 229)"," like any other CSS, so nothing in this guide changes.",[573,1307,1309],{"id":1308},"why-do-my-extracted-colors-include-values-the-site-never-visibly-uses","Why do my extracted colors include values the site never visibly uses?",[11,1311,1312],{},"Three usual suspects: browser defaults on elements you collected, cookie banners and chat widgets injecting their own palette, and transparent or inherited values you forgot to filter.",[573,1314,1316],{"id":1315},"how-many-pages-should-i-sample","How many pages should I sample?",[11,1318,1319],{},"One landing page is usually enough for brand color and typography. Add one product or app page for functional colors (success, error, info). More than three pages rarely changes the top tokens.",[24,1321,1323],{"id":1322},"related-reading","Related reading",[1043,1325,1326,1333,1340],{},[1001,1327,1328,1332],{},[18,1329,1331],{"href":1330},"/api/design-tokens-api","Design tokens API"," - the endpoint this post's shortcut uses",[1001,1334,1335,1339],{},[18,1336,1338],{"href":1337},"/api/docs/design-tokens","Design tokens docs"," - full response shape and field list",[1001,1341,1342,1346],{},[18,1343,1345],{"href":1344},"/api/use-cases/ai-agent-ground-truth","Ground truth for AI agents"," - why agents need real tokens instead of guessing from screenshots",[618,1348,1349],{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":456,"searchDepth":485,"depth":485,"links":1351},[1352,1353,1354,1355,1356,1357,1358,1359,1365],{"id":683,"depth":485,"text":684},{"id":943,"depth":485,"text":944},{"id":992,"depth":485,"text":993},{"id":1037,"depth":485,"text":1038},{"id":1106,"depth":485,"text":1107},{"id":1198,"depth":485,"text":1199},{"id":1268,"depth":485,"text":1269},{"id":570,"depth":485,"text":571,"children":1360},[1361,1362,1363,1364],{"id":1284,"depth":629,"text":1285},{"id":1291,"depth":629,"text":1292},{"id":1308,"depth":629,"text":1309},{"id":1315,"depth":629,"text":1316},{"id":1322,"depth":485,"text":1323},"Tutorials","Extract colors, fonts, spacing, and shadows from any website with Playwright in Python - working code, the gotchas that bite, and the one-API-call shortcut.",[1369,1371,1373,1375],{"question":1285,"answer":1370},"You can parse the site's CSS files with a library like tinycss2, but on modern sites this works badly. CSS-in-JS generates styles at runtime, utility-class sites like Tailwind bury the palette in thousands of class rules, and you cannot tell which declared values are actually used. Computed styles from a real browser are the ground truth.",{"question":1292,"answer":1372},"Ignore the class names entirely and read computed styles. getComputedStyle resolves bg-indigo-600 to rgb(79, 70, 229) the same way it resolves any other CSS, so the frequency-counting approach in this guide works unchanged.",{"question":1309,"answer":1374},"Three usual suspects: browser default styles on elements you collected, cookie banners and chat widgets injecting their own palette, and transparent or inherited values you forgot to filter. Count frequency, filter defaults, and dismiss overlays before collecting.",{"question":1376,"answer":1377},"How many pages should I sample to get a reliable palette?","One page is usually enough for brand color and typography if it is the homepage or a landing page. Add one product or app page for the functional palette (success, error, info states). More than three pages rarely changes the top tokens.",{},"/api-blog/how-to-extract-design-tokens-from-any-website-in-python",[655,1381,1382],"design-token-types-reference","how-to-extract-website-color-palette-programmatically",{"title":668,"description":1367},"api-blog/how-to-extract-design-tokens-from-any-website-in-python",[660,721,708,662,1386],"web extraction","L5qnHk0I6Xw2LZ4KpLx52C6CU18QlatcV45aNNbr8F0",{"id":1389,"title":1390,"author":6,"body":1391,"category":1797,"date":634,"dateModified":635,"description":1798,"extension":637,"faqs":1799,"image":635,"meta":1811,"navigation":650,"path":1812,"readingTime":758,"relatedSlugs":1813,"seo":1815,"stem":1816,"tags":1817,"__hash__":1821},"apiBlog/api-blog/best-design-token-extraction-tools-2026.md","Best Design Token Extraction Tools in 2026",{"type":8,"value":1392,"toc":1781},[1393,1396,1400,1409,1429,1433,1441,1458,1462,1470,1487,1491,1499,1516,1520,1528,1545,1549,1552,1582,1602,1606,1720,1724,1733,1735,1739,1742,1746,1758,1762,1768,1772,1779],[11,1394,1395],{},"There are six honest ways to get design tokens out of a live website in 2026, and the right one depends on whether you are doing this once, weekly, or inside a product. Here is the list, with the tradeoffs stated plainly. Yes, our own API is on it - ranked where I would rank it if it were not ours.",[24,1397,1399],{"id":1398},"_1-css-stats-fastest-free-look","1. CSS Stats - fastest free look",[11,1401,1402,1408],{},[18,1403,1407],{"href":1404,"rel":1405},"https://cssstats.com",[1406],"nofollow","cssstats.com"," has been the \"paste a URL, see the CSS\" tool for a decade. It reports every color, font size, and font family the stylesheet declares, plus specificity graphs nobody asks for but everyone screenshots.",[1043,1410,1411,1417,1423],{},[1001,1412,1413,1416],{},[407,1414,1415],{},"Good:"," free, no signup, instant.",[1001,1418,1419,1422],{},[407,1420,1421],{},"Bad:"," it reads declared CSS, not used CSS. A site shipping a big framework stylesheet reports hundreds of colors that never render. There is no export worth automating against.",[1001,1424,1425,1428],{},[407,1426,1427],{},"Use it when:"," you want a two-minute overview of a site's CSS health, not a token set.",[24,1430,1432],{"id":1431},"_2-project-wallace-the-analyzer-that-kept-evolving","2. Project Wallace - the analyzer that kept evolving",[11,1434,1435,1440],{},[18,1436,1439],{"href":1437,"rel":1438},"https://www.projectwallace.com",[1406],"Project Wallace"," does what CSS Stats does but deeper: color counts, typography breakdowns, and change tracking over time if you create an account.",[1043,1442,1443,1448,1453],{},[1001,1444,1445,1447],{},[407,1446,1415],{}," the most thorough free CSS analysis on the web, actively maintained.",[1001,1449,1450,1452],{},[407,1451,1421],{}," same fundamental limit - declared, not rendered. Still a report you read, not a token file you use.",[1001,1454,1455,1457],{},[407,1456,1427],{}," auditing your own CSS over time, or studying how a site's stylesheet is put together.",[24,1459,1461],{"id":1460},"_3-superposition-tokens-on-your-desktop","3. Superposition - tokens on your desktop",[11,1463,1464,1469],{},[18,1465,1468],{"href":1466,"rel":1467},"https://superposition.design",[1406],"Superposition"," is a desktop app that crawls a page and exports design tokens to CSS variables, Sass, JS, and even Adobe XD. It was ahead of its time.",[1043,1471,1472,1477,1482],{},[1001,1473,1474,1476],{},[407,1475,1415],{}," genuine token export formats, one-click, offline app.",[1001,1478,1479,1481],{},[407,1480,1421],{}," desktop-only, so there is nothing to call from code or CI. Development has been quiet for a while - check that the export you need still works.",[1001,1483,1484,1486],{},[407,1485,1427],{}," you are a designer who wants tokens from a reference site without touching a terminal.",[24,1488,1490],{"id":1489},"_4-a-diy-playwright-script-full-control","4. A DIY Playwright script - full control",[11,1492,1493,1494,1496,1497,616],{},"Load the page in a headless browser, read ",[62,1495,931],{}," off every element, count what repeats. We wrote the complete walkthrough in ",[18,1498,668],{"href":20},[1043,1500,1501,1506,1511],{},[1001,1502,1503,1505],{},[407,1504,1415],{}," free, sees exactly what renders (including runtime CSS-in-JS), infinitely customizable.",[1001,1507,1508,1510],{},[407,1509,1421],{}," you now run browser infrastructure. Cookie banners, lazy fonts, and viewport-dependent styles are your problem, and the script that worked in April breaks in July.",[1001,1512,1513,1515],{},[407,1514,1427],{}," one-off extractions, research, or when you need something no tool exposes.",[24,1517,1519],{"id":1518},"_5-miromiro-browser-extension-point-and-click","5. MiroMiro browser extension - point and click",[11,1521,1522,1523,1527],{},"Our ",[18,1524,1526],{"href":1525},"/features/design-tokens","extension"," shows a site's tokens live as you browse: colors, typography, spacing, assets. Click an element, see its resolved styles, export what you want.",[1043,1529,1530,1535,1540],{},[1001,1531,1532,1534],{},[407,1533,1415],{}," zero setup, visual, great for picking tokens from a specific component rather than the whole page.",[1001,1536,1537,1539],{},[407,1538,1421],{}," it is a human tool. Nothing to automate, no JSON endpoint, and it extracts what you look at, not a thousand URLs.",[1001,1541,1542,1544],{},[407,1543,1427],{}," hand-picking design decisions from reference sites during design or build.",[24,1546,1548],{"id":1547},"_6-miromiro-extract-api-tokens-as-an-endpoint","6. MiroMiro extract API - tokens as an endpoint",[11,1550,1551],{},"One GET request returns the ranked token set as JSON, CSS variables, or a Tailwind theme block:",[451,1553,1555],{"className":453,"code":1554,"language":455,"meta":456,"style":456},"curl \"https://miromiro.app/api/v1/extract?url=stripe.com&format=tailwind\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n",[62,1556,1557,1570],{"__ignoreMap":456},[460,1558,1559,1561,1563,1566,1568],{"class":462,"line":463},[460,1560,467],{"class":466},[460,1562,471],{"class":470},[460,1564,1565],{"class":474},"https://miromiro.app/api/v1/extract?url=stripe.com&format=tailwind",[460,1567,478],{"class":470},[460,1569,482],{"class":481},[460,1571,1572,1574,1576,1578,1580],{"class":462,"line":485},[460,1573,488],{"class":474},[460,1575,471],{"class":470},[460,1577,493],{"class":474},[460,1579,496],{"class":481},[460,1581,499],{"class":470},[1043,1583,1584,1592,1597],{},[1001,1585,1586,1588,1589,1591],{},[407,1587,1415],{}," deduped and ranked (not raw declared values), covers colors, type scale, spacing, radii, shadows, gradients, and motion, resolves ",[62,1590,1194],{}," chains and every declared breakpoint. It is the only option on this list you can put inside a product.",[1001,1593,1594,1596],{},[407,1595,1421],{}," it parses static HTML + CSS and does not execute JavaScript, so a fully client-rendered app can come back thin. Costs credits past the free 100 a month.",[1001,1598,1599,1601],{},[407,1600,1427],{}," tokens need to arrive programmatically - agent pipelines, onboarding flows, bulk analysis.",[24,1603,1605],{"id":1604},"the-comparison-in-one-table","The comparison in one table",[29,1607,1608,1627],{},[32,1609,1610],{},[35,1611,1612,1615,1618,1621,1624],{},[38,1613,1614],{},"Tool",[38,1616,1617],{},"Output",[38,1619,1620],{},"Rendered or declared?",[38,1622,1623],{},"Automatable",[38,1625,1626],{},"Price",[51,1628,1629,1645,1660,1674,1690,1704],{},[35,1630,1631,1634,1637,1640,1642],{},[56,1632,1633],{},"CSS Stats",[56,1635,1636],{},"Web report",[56,1638,1639],{},"Declared",[56,1641,1162],{},[56,1643,1644],{},"Free",[35,1646,1647,1649,1652,1654,1657],{},[56,1648,1439],{},[56,1650,1651],{},"Web report + tracking",[56,1653,1639],{},[56,1655,1656],{},"Partially",[56,1658,1659],{},"Free tier",[35,1661,1662,1664,1667,1670,1672],{},[56,1663,1468],{},[56,1665,1666],{},"Token files (CSS/Sass/JS)",[56,1668,1669],{},"Rendered",[56,1671,1162],{},[56,1673,1644],{},[35,1675,1676,1679,1682,1684,1687],{},[56,1677,1678],{},"DIY Playwright",[56,1680,1681],{},"Whatever you build",[56,1683,1669],{},[56,1685,1686],{},"Yes, you maintain it",[56,1688,1689],{},"Your time",[35,1691,1692,1695,1698,1700,1702],{},[56,1693,1694],{},"MiroMiro extension",[56,1696,1697],{},"Visual + export",[56,1699,1669],{},[56,1701,1162],{},[56,1703,1659],{},[35,1705,1706,1709,1712,1715,1717],{},[56,1707,1708],{},"MiroMiro API",[56,1710,1711],{},"JSON / CSS vars / Tailwind",[56,1713,1714],{},"Parsed + resolved",[56,1716,1141],{},[56,1718,1719],{},"100 credits/mo free, then from €19/mo",[24,1721,1723],{"id":1722},"the-verdict","The verdict",[11,1725,1726,1727,1729,1730,1732],{},"For a quick look, Project Wallace. For hand-picking from a reference site, the extension. For anything that runs on a schedule or inside a product, the API - and I would say that even if it were someone else's, because it is the only entry here that returns a token file over HTTP. You can ",[18,1728,1260],{"href":565}," (100 credits a month, no card) or poke it in the ",[18,1731,1265],{"href":1264}," first.",[24,1734,571],{"id":570},[573,1736,1738],{"id":1737},"what-is-the-fastest-free-way-to-extract-design-tokens-from-a-website","What is the fastest free way to extract design tokens from a website?",[11,1740,1741],{},"Paste the URL into CSS Stats or Project Wallace. Seconds, no signup. Expect raw declared values, not a cleaned token set.",[573,1743,1745],{"id":1744},"can-i-get-tokens-as-css-variables-or-a-tailwind-config-directly","Can I get tokens as CSS variables or a Tailwind config directly?",[11,1747,1748,1749,1751,1752,1754,1755,616],{},"Yes - ",[62,1750,557],{}," returns custom properties, ",[62,1753,561],{}," returns a theme block. Details in the ",[18,1756,1757],{"href":1337},"design tokens docs",[573,1759,1761],{"id":1760},"do-these-tools-work-on-tailwind-sites","Do these tools work on Tailwind sites?",[11,1763,1764,1765,1767],{},"The ones reading real CSS or computed styles do; ",[62,1766,1301],{}," is just CSS once shipped. Tools that only look for CSS custom properties miss most of a Tailwind site's system.",[573,1769,1771],{"id":1770},"what-is-the-difference-between-a-token-set-and-a-color-palette","What is the difference between a token set and a color palette?",[11,1773,1774,1775,616],{},"A palette is one token group. A full token set adds the type scale, spacing, radii, shadows, motion, and z-index layers - see the ",[18,1776,1778],{"href":1777},"/api/blog/design-token-types-reference","design token types reference",[618,1780,620],{},{"title":456,"searchDepth":485,"depth":485,"links":1782},[1783,1784,1785,1786,1787,1788,1789,1790,1791],{"id":1398,"depth":485,"text":1399},{"id":1431,"depth":485,"text":1432},{"id":1460,"depth":485,"text":1461},{"id":1489,"depth":485,"text":1490},{"id":1518,"depth":485,"text":1519},{"id":1547,"depth":485,"text":1548},{"id":1604,"depth":485,"text":1605},{"id":1722,"depth":485,"text":1723},{"id":570,"depth":485,"text":571,"children":1792},[1793,1794,1795,1796],{"id":1737,"depth":629,"text":1738},{"id":1744,"depth":629,"text":1745},{"id":1760,"depth":629,"text":1761},{"id":1770,"depth":629,"text":1771},"Comparisons","Six real ways to pull design tokens from a live website in 2026 - free analyzers, a DIY script, a browser extension, and an API - honestly ranked.",[1800,1802,1805,1808],{"question":1738,"answer":1801},"Paste the URL into a CSS analyzer like CSS Stats or Project Wallace. You get colors, font sizes, and specificity data in seconds with no signup. The output is raw declared values rather than a cleaned token set, so expect to filter it by hand.",{"question":1803,"answer":1804},"Can I get design tokens as CSS variables or a Tailwind config directly?","Yes. The MiroMiro extract endpoint takes format=css to return CSS custom properties or format=tailwind to return a theme config block, so the tokens drop straight into a codebase without a conversion step.",{"question":1806,"answer":1807},"Do design token extractors work on Tailwind sites?","Tools that read the site's actual CSS or computed styles do, because bg-indigo-600 is just CSS once shipped. Tools that look for CSS variables only will miss most of a Tailwind site's system, since utility-first sites often define few custom properties.",{"question":1809,"answer":1810},"What is the difference between extracting design tokens and extracting a color palette?","A palette is one token group. A design token set also covers the type scale, spacing, radii, shadows, motion, and z-index layers - the full set of decisions you need to rebuild UI in the site's style.",{},"/api-blog/best-design-token-extraction-tools-2026",[654,1381,1814],"best-design-to-code-apis-2026",{"title":1390,"description":1798},"api-blog/best-design-token-extraction-tools-2026",[660,1818,1819,1820],"tools","comparison","css analysis","GhGcQEA8Q7VmKm_mMFRSpL45k0PaBwatHPzBRiFUK9g",{"id":1823,"title":1824,"author":6,"body":1825,"category":1366,"date":634,"dateModified":635,"description":2541,"extension":637,"faqs":2542,"image":635,"meta":2555,"navigation":650,"path":2556,"readingTime":652,"relatedSlugs":2557,"seo":2558,"stem":2559,"tags":2560,"__hash__":2565},"apiBlog/api-blog/how-to-detect-fonts-a-website-uses.md","How to Detect and Extract the Fonts a Website Uses",{"type":8,"value":1826,"toc":2526},[1827,1837,1840,1844,2078,2081,2085,2088,2165,2172,2176,2187,2191,2214,2321,2334,2338,2413,2415,2422,2452,2468,2470,2481,2483,2487,2490,2494,2500,2504,2516,2520,2523],[11,1828,1829,1830,1833,1834,1836],{},"The fastest way to see a website's fonts is DevTools: select an element and check the ",[407,1831,1832],{},"rendered fonts"," panel at the bottom of the Computed tab. It names what actually painted, which - and this is the whole subject of this post - is frequently not what the CSS asked for. ",[62,1835,119],{}," is a wish list. The browser walks it until something works, and with lazy loading in the mix, what renders can differ from what is declared, per element, per moment.",[11,1838,1839],{},"For anything beyond one element, you want a script. Here are the three signals worth reading, and what each one can and cannot tell you.",[24,1841,1843],{"id":1842},"signal-1-computed-styles-what-css-resolved-to","Signal 1: computed styles (what CSS resolved to)",[451,1845,1849],{"className":1846,"code":1847,"language":1848,"meta":456,"style":456},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","// Paste in the console: ranked font stacks in use\nObject.entries([...document.querySelectorAll('body *')].reduce((acc, el) => {\n  const f = getComputedStyle(el).fontFamily;\n  acc[f] = (acc[f] || 0) + 1;\n  return acc;\n}, {})).sort((a, b) => b[1] - a[1]).slice(0, 5)\n","js",[62,1850,1851,1857,1924,1954,2000,2011],{"__ignoreMap":456},[460,1852,1853],{"class":462,"line":463},[460,1854,1856],{"class":1855},"sHwdD","// Paste in the console: ranked font stacks in use\n",[460,1858,1859,1862,1864,1868,1871,1874,1877,1879,1881,1884,1887,1890,1892,1895,1897,1900,1902,1904,1908,1911,1914,1917,1921],{"class":462,"line":485},[460,1860,1861],{"class":481},"Object",[460,1863,616],{"class":470},[460,1865,1867],{"class":1866},"s2Zo4","entries",[460,1869,1870],{"class":481},"([",[460,1872,1873],{"class":470},"...",[460,1875,1876],{"class":481},"document",[460,1878,616],{"class":470},[460,1880,1098],{"class":1866},[460,1882,1883],{"class":481},"(",[460,1885,1886],{"class":470},"'",[460,1888,1889],{"class":474},"body *",[460,1891,1886],{"class":470},[460,1893,1894],{"class":481},")]",[460,1896,616],{"class":470},[460,1898,1899],{"class":1866},"reduce",[460,1901,1883],{"class":481},[460,1903,1883],{"class":470},[460,1905,1907],{"class":1906},"sHdIc","acc",[460,1909,1910],{"class":470},",",[460,1912,1913],{"class":1906}," el",[460,1915,1916],{"class":470},")",[460,1918,1920],{"class":1919},"spNyl"," =>",[460,1922,1923],{"class":470}," {\n",[460,1925,1926,1929,1932,1935,1938,1941,1944,1946,1948,1951],{"class":462,"line":629},[460,1927,1928],{"class":1919},"  const",[460,1930,1931],{"class":481}," f",[460,1933,1934],{"class":470}," =",[460,1936,1937],{"class":1866}," getComputedStyle",[460,1939,1883],{"class":1940},"swJcz",[460,1942,1943],{"class":481},"el",[460,1945,1916],{"class":1940},[460,1947,616],{"class":470},[460,1949,1950],{"class":481},"fontFamily",[460,1952,1953],{"class":470},";\n",[460,1955,1956,1959,1962,1965,1968,1971,1974,1976,1978,1980,1982,1985,1989,1992,1995,1998],{"class":462,"line":741},[460,1957,1958],{"class":481},"  acc",[460,1960,1961],{"class":1940},"[",[460,1963,1964],{"class":481},"f",[460,1966,1967],{"class":1940},"] ",[460,1969,1970],{"class":470},"=",[460,1972,1973],{"class":1940}," (",[460,1975,1907],{"class":481},[460,1977,1961],{"class":1940},[460,1979,1964],{"class":481},[460,1981,1967],{"class":1940},[460,1983,1984],{"class":470},"||",[460,1986,1988],{"class":1987},"sbssI"," 0",[460,1990,1991],{"class":1940},") ",[460,1993,1994],{"class":470},"+",[460,1996,1997],{"class":1987}," 1",[460,1999,1953],{"class":470},[460,2001,2002,2006,2009],{"class":462,"line":747},[460,2003,2005],{"class":2004},"s7zQu","  return",[460,2007,2008],{"class":481}," acc",[460,2010,1953],{"class":470},[460,2012,2013,2016,2019,2022,2024,2027,2029,2031,2033,2035,2038,2040,2042,2045,2048,2050,2053,2056,2058,2061,2063,2066,2068,2071,2073,2076],{"class":462,"line":652},[460,2014,2015],{"class":470},"},",[460,2017,2018],{"class":470}," {}",[460,2020,2021],{"class":481},"))",[460,2023,616],{"class":470},[460,2025,2026],{"class":1866},"sort",[460,2028,1883],{"class":481},[460,2030,1883],{"class":470},[460,2032,18],{"class":1906},[460,2034,1910],{"class":470},[460,2036,2037],{"class":1906}," b",[460,2039,1916],{"class":470},[460,2041,1920],{"class":1919},[460,2043,2044],{"class":481}," b[",[460,2046,2047],{"class":1987},"1",[460,2049,1967],{"class":481},[460,2051,2052],{"class":470},"-",[460,2054,2055],{"class":481}," a[",[460,2057,2047],{"class":1987},[460,2059,2060],{"class":481},"])",[460,2062,616],{"class":470},[460,2064,2065],{"class":1866},"slice",[460,2067,1883],{"class":481},[460,2069,2070],{"class":1987},"0",[460,2072,1910],{"class":470},[460,2074,2075],{"class":1987}," 5",[460,2077,981],{"class":481},[11,2079,2080],{},"This tells you which stacks the cascade assigned where - the heading family vs the body family falls straight out of the counts. What it does not tell you: whether the first font in the stack ever loaded.",[24,2082,2084],{"id":2083},"signal-2-documentfonts-what-actually-loaded","Signal 2: document.fonts (what actually loaded)",[11,2086,2087],{},"The FontFace API is the receipt:",[451,2089,2091],{"className":1846,"code":2090,"language":1848,"meta":456,"style":456},"[...document.fonts].map(f => `${f.family} ${f.weight} - ${f.status}`)\n// e.g. [\"Sohne 400 - loaded\", \"Sohne 700 - loaded\", \"SohneMono 400 - unloaded\"]\n",[62,2092,2093,2160],{"__ignoreMap":456},[460,2094,2095,2097,2099,2101,2103,2106,2108,2111,2113,2115,2117,2120,2122,2124,2127,2130,2133,2135,2137,2140,2142,2145,2148,2150,2152,2155,2158],{"class":462,"line":463},[460,2096,1961],{"class":481},[460,2098,1873],{"class":470},[460,2100,1876],{"class":481},[460,2102,616],{"class":470},[460,2104,2105],{"class":481},"fonts]",[460,2107,616],{"class":470},[460,2109,2110],{"class":1866},"map",[460,2112,1883],{"class":481},[460,2114,1964],{"class":1906},[460,2116,1920],{"class":1919},[460,2118,2119],{"class":470}," `${",[460,2121,1964],{"class":481},[460,2123,616],{"class":470},[460,2125,2126],{"class":481},"family",[460,2128,2129],{"class":470},"}",[460,2131,2132],{"class":470}," ${",[460,2134,1964],{"class":481},[460,2136,616],{"class":470},[460,2138,2139],{"class":481},"weight",[460,2141,2129],{"class":470},[460,2143,2144],{"class":474}," - ",[460,2146,2147],{"class":470},"${",[460,2149,1964],{"class":481},[460,2151,616],{"class":470},[460,2153,2154],{"class":481},"status",[460,2156,2157],{"class":470},"}`",[460,2159,981],{"class":481},[460,2161,2162],{"class":462,"line":485},[460,2163,2164],{"class":1855},"// e.g. [\"Sohne 400 - loaded\", \"Sohne 700 - loaded\", \"SohneMono 400 - unloaded\"]\n",[11,2166,2167,2168,2171],{},"Every registered webfont with its weight and load status. An ",[62,2169,2170],{},"unloaded"," entry means the CSS declared it but nothing on the page triggered the download - a font the site owns but this page does not use.",[24,2173,2175],{"id":2174},"signal-3-the-network-where-fonts-come-from","Signal 3: the network (where fonts come from)",[11,2177,2178,2179,2182,2183,2186],{},"Filter DevTools' Network tab by \"Font\" and you get provenance: ",[62,2180,2181],{},"fonts.gstatic.com"," means Google Fonts, ",[62,2184,2185],{},"use.typekit.net"," means Adobe, files off the site's own domain mean self-hosted (and usually a commercial license).",[24,2188,2190],{"id":2189},"all-three-from-python","All three from Python",[451,2192,2194],{"className":453,"code":2193,"language":455,"meta":456,"style":456},"pip install playwright && playwright install chromium\n",[62,2195,2196],{"__ignoreMap":456},[460,2197,2198,2200,2202,2205,2208,2210,2212],{"class":462,"line":463},[460,2199,697],{"class":466},[460,2201,700],{"class":474},[460,2203,2204],{"class":474}," playwright",[460,2206,2207],{"class":470}," &&",[460,2209,2204],{"class":466},[460,2211,700],{"class":474},[460,2213,713],{"class":474},[451,2215,2217],{"className":719,"code":2216,"language":721,"meta":456,"style":456},"from playwright.sync_api import sync_playwright\n\nwith sync_playwright() as p:\n    browser = p.chromium.launch()\n    page = browser.new_page()\n    font_urls = []\n    page.on(\"response\", lambda r: font_urls.append(r.url)\n            if r.request.resource_type == \"font\" else None)\n    page.goto(\"https://stripe.com\", wait_until=\"networkidle\")\n    page.evaluate(\"document.fonts.ready\")\n\n    loaded = page.evaluate(\n        \"[...document.fonts].map(f => `${f.family} ${f.weight} ${f.status}`)\")\n    used = page.evaluate(\"\"\"\n      [...new Set([...document.querySelectorAll('h1,h2,h3,p,a,button')]\n        .map(el => getComputedStyle(el).fontFamily))]\n    \"\"\")\n    browser.close()\n\nprint(\"LOADED:\", loaded)\nprint(\"USED:\", used)\nprint(\"SERVED FROM:\", {u.split('/')[2] for u in font_urls})\n",[62,2218,2219,2223,2227,2231,2235,2240,2245,2250,2255,2259,2264,2268,2273,2278,2283,2288,2293,2298,2302,2306,2311,2316],{"__ignoreMap":456},[460,2220,2221],{"class":462,"line":463},[460,2222,733],{},[460,2224,2225],{"class":462,"line":485},[460,2226,738],{"emptyLinePlaceholder":650},[460,2228,2229],{"class":462,"line":629},[460,2230,855],{},[460,2232,2233],{"class":462,"line":741},[460,2234,861],{},[460,2236,2237],{"class":462,"line":747},[460,2238,2239],{},"    page = browser.new_page()\n",[460,2241,2242],{"class":462,"line":652},[460,2243,2244],{},"    font_urls = []\n",[460,2246,2247],{"class":462,"line":758},[460,2248,2249],{},"    page.on(\"response\", lambda r: font_urls.append(r.url)\n",[460,2251,2252],{"class":462,"line":764},[460,2253,2254],{},"            if r.request.resource_type == \"font\" else None)\n",[460,2256,2257],{"class":462,"line":770},[460,2258,873],{},[460,2260,2261],{"class":462,"line":776},[460,2262,2263],{},"    page.evaluate(\"document.fonts.ready\")\n",[460,2265,2266],{"class":462,"line":782},[460,2267,738],{"emptyLinePlaceholder":650},[460,2269,2270],{"class":462,"line":788},[460,2271,2272],{},"    loaded = page.evaluate(\n",[460,2274,2275],{"class":462,"line":794},[460,2276,2277],{},"        \"[...document.fonts].map(f => `${f.family} ${f.weight} ${f.status}`)\")\n",[460,2279,2280],{"class":462,"line":800},[460,2281,2282],{},"    used = page.evaluate(\"\"\"\n",[460,2284,2285],{"class":462,"line":806},[460,2286,2287],{},"      [...new Set([...document.querySelectorAll('h1,h2,h3,p,a,button')]\n",[460,2289,2290],{"class":462,"line":812},[460,2291,2292],{},"        .map(el => getComputedStyle(el).fontFamily))]\n",[460,2294,2295],{"class":462,"line":818},[460,2296,2297],{},"    \"\"\")\n",[460,2299,2300],{"class":462,"line":824},[460,2301,885],{},[460,2303,2304],{"class":462,"line":830},[460,2305,738],{"emptyLinePlaceholder":650},[460,2307,2308],{"class":462,"line":835},[460,2309,2310],{},"print(\"LOADED:\", loaded)\n",[460,2312,2313],{"class":462,"line":841},[460,2314,2315],{},"print(\"USED:\", used)\n",[460,2317,2318],{"class":462,"line":847},[460,2319,2320],{},"print(\"SERVED FROM:\", {u.split('/')[2] for u in font_urls})\n",[11,2322,2323,2324,2326,2327,2329,2330,2333],{},"The ",[62,2325,1075],{}," await matters. Skip it and a ",[62,2328,1071],{}," site reports its fallback stack, because you measured during the swap window. This is the single most common reason font detection scripts return ",[62,2331,2332],{},"Arial"," for sites that very much do not use Arial.",[24,2335,2337],{"id":2336},"what-each-signal-can-tell-you","What each signal can tell you",[29,2339,2340,2356],{},[32,2341,2342],{},[35,2343,2344,2347,2350,2353],{},[38,2345,2346],{},"Question",[38,2348,2349],{},"Computed styles",[38,2351,2352],{},"document.fonts",[38,2354,2355],{},"Network",[51,2357,2358,2369,2380,2391,2402],{},[35,2359,2360,2363,2365,2367],{},[56,2361,2362],{},"Which family is used for headings vs body",[56,2364,1141],{},[56,2366,1162],{},[56,2368,1162],{},[35,2370,2371,2374,2376,2378],{},[56,2372,2373],{},"Did the webfont actually load",[56,2375,1162],{},[56,2377,1141],{},[56,2379,1141],{},[35,2381,2382,2385,2387,2389],{},[56,2383,2384],{},"Weights the site ships",[56,2386,1656],{},[56,2388,1141],{},[56,2390,1141],{},[35,2392,2393,2396,2398,2400],{},[56,2394,2395],{},"Google Fonts vs self-hosted vs Adobe",[56,2397,1162],{},[56,2399,1162],{},[56,2401,1141],{},[35,2403,2404,2407,2409,2411],{},[56,2405,2406],{},"Works without executing the page",[56,2408,1162],{},[56,2410,1162],{},[56,2412,1162],{},[24,2414,1199],{"id":1198},[11,2416,2417,2418,2421],{},"Our fonts endpoint reads the declared font sources from the page's HTML and CSS - ",[62,2419,2420],{},"@font-face"," rules, Google Fonts links, preloads - and returns families, weights, and where they are served from:",[451,2423,2425],{"className":453,"code":2424,"language":455,"meta":456,"style":456},"curl \"https://miromiro.app/api/v1/fonts?url=stripe.com\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n",[62,2426,2427,2440],{"__ignoreMap":456},[460,2428,2429,2431,2433,2436,2438],{"class":462,"line":463},[460,2430,467],{"class":466},[460,2432,471],{"class":470},[460,2434,2435],{"class":474},"https://miromiro.app/api/v1/fonts?url=stripe.com",[460,2437,478],{"class":470},[460,2439,482],{"class":481},[460,2441,2442,2444,2446,2448,2450],{"class":462,"line":485},[460,2443,488],{"class":474},[460,2445,471],{"class":470},[460,2447,493],{"class":474},[460,2449,496],{"class":481},[460,2451,499],{"class":470},[11,2453,2454,2455,2458,2459,2463,2464,2467],{},"For the full typographic token set (sizes, weights, line heights, letter spacing alongside the families), use ",[18,2456,2457],{"href":1337},"/v1/extract"," instead. There is also a ",[18,2460,2462],{"href":2461},"/api/tools/font-extractor","free font extractor"," if you want to check one site right now with no key. ",[18,2465,2466],{"href":565},"Free key",": 100 credits a month, no card.",[24,2469,1269],{"id":1268},[11,2471,2472,2474,2475,2477,2478,2480],{},[62,2473,119],{}," declares intent; ",[62,2476,2352],{}," reports reality; the network names the source. Cross-reference at least the first two, always after ",[62,2479,1075],{},", and be suspicious of any script that confidently reports a system font on a design-forward site - it probably measured mid-swap.",[24,2482,571],{"id":570},[573,2484,2486],{"id":2485},"how-do-i-find-a-websites-font-without-an-extension","How do I find a website's font without an extension?",[11,2488,2489],{},"DevTools → Computed tab → rendered fonts panel. It names what painted, not what was requested.",[573,2491,2493],{"id":2492},"why-does-font-family-show-a-font-that-isnt-rendering","Why does font-family show a font that isn't rendering?",[11,2495,2496,2497,2499],{},"Because it is a fallback list. With ",[62,2498,1071],{},", the fallback can render and stay whenever the webfont is slow or never loads.",[573,2501,2503],{"id":2502},"how-do-i-detect-fonts-from-a-script","How do I detect fonts from a script?",[11,2505,2506,2507,2509,2510,2512,2513,2515],{},"Playwright, await ",[62,2508,1075],{},", then read ",[62,2511,2352],{}," and computed ",[62,2514,1950],{}," values together (code above).",[573,2517,2519],{"id":2518},"can-i-use-a-font-i-found-on-a-website","Can I use a font I found on a website?",[11,2521,2522],{},"Identifying is fine, using needs a license. Google Fonts yes; a site's self-hosted commercial webfonts are licensed to that site, not to you.",[618,2524,2525],{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":456,"searchDepth":485,"depth":485,"links":2527},[2528,2529,2530,2531,2532,2533,2534,2535],{"id":1842,"depth":485,"text":1843},{"id":2083,"depth":485,"text":2084},{"id":2174,"depth":485,"text":2175},{"id":2189,"depth":485,"text":2190},{"id":2336,"depth":485,"text":2337},{"id":1198,"depth":485,"text":1199},{"id":1268,"depth":485,"text":1269},{"id":570,"depth":485,"text":571,"children":2536},[2537,2538,2539,2540],{"id":2485,"depth":629,"text":2486},{"id":2492,"depth":629,"text":2493},{"id":2502,"depth":629,"text":2503},{"id":2518,"depth":629,"text":2519},"Three ways to detect which fonts a website really uses - computed styles, document.fonts, and network sniffing - and why font-family lies to you.",[2543,2546,2549,2552],{"question":2544,"answer":2545},"How do I find out what font a website uses without an extension?","Open DevTools, select the element, and look at the Computed tab's rendered fonts section at the bottom - it names the font actually painted, not just the CSS stack. Or run document.fonts in the console to list every FontFace the page registered and whether each loaded.",{"question":2547,"answer":2548},"Why does font-family show a font that isn't actually rendering?","font-family is a wish list, not a receipt. The browser walks the stack until something is available; with font-display: swap a fallback renders first and stays if the webfont never finishes loading. Only the rendered-fonts panel or document.fonts tells you what really painted.",{"question":2550,"answer":2551},"How can I detect fonts from a script instead of DevTools?","Load the page with Playwright, await document.fonts.ready, then read both document.fonts (registered FontFaces with load status) and getComputedStyle fontFamily values across elements. Cross-referencing the two separates fonts that loaded from fonts that were merely requested.",{"question":2553,"answer":2554},"Can I legally use a font I found on a website?","Identifying a font is fine; using it needs a license. Google Fonts are open, but commercial webfonts (the files served from the site's own domain or a foundry CDN) are licensed to that site, not to you. Buy or substitute.",{},"/api-blog/how-to-detect-fonts-a-website-uses",[1382,654,1381],{"title":1824,"description":2541},"api-blog/how-to-detect-fonts-a-website-uses",[2561,2562,2563,721,2564],"fonts","font detection","javascript","typography","j1PMCGDTmZ62w1LGv7I0rP5_XmM7utcCv420iy6QF7Q",1784751617415]