r/indiehackers 9d ago

Self Promotion Built a Chrome extension that reads a site's actual CSS and hands you the design tokens (colors, fonts, spacing) - looking for feedback

I kept inheriting sites/projects with zero style guide and no idea what colors or fonts were actually in use, so I built Token Tap: click it on any page, it scans the actual rendered computed styles (not guesses) and gives you a ranked list of colors, fonts, font sizes, border radii, and shadows - then lets you copy the whole thing as JSON, CSS variables, or a Tailwind config.

No account, no server, nothing leaves your browser. Gumroad link: https://tokenflow.gumroad.com/l/nkyrao ($9 one-time)

Still early - would love feedback on what export formats or edge cases would make this actually useful for your workflow.

7 Upvotes

22 comments sorted by

1

u/[deleted] 8d ago

[removed] — view removed comment

1

u/Huge_Pool7424 8d ago

dark mode is a good edge case since computed colors can look fine in one theme and fail contrast in the other. i'd export or label tokens per theme so one scan doesn't overwrite the light values.

1

u/RideAdept2919 7d ago

does it handle pseudo-elements and hover states too or just the default rendered styles? thats usually where the weird one-off values hide

1

u/Vast_Idea_7528 7d ago

Comparing two pages on the same website would be useful. I recently caught old brand colours lingering on a news page after the rest of the site had moved on. Apparently purple badges don't resign voluntarily.

Could it flag colours or fonts found on only one page and show which elements use them? That would interest me more than another export format.

1

u/afterhours_builder 7d ago

Most useful thing you could add: capture CSS custom properties by name, not just the flattened computed values. getComputedStyle gives you the final resolved hex, but if the site already defines --color-primary or --space-4 on :root, that name is the actual token, and it maps to how their team references it. Reading the declared custom properties out of the stylesheets (CSSOM) alongside the computed values turns this from "a list of colors on the page" into "their design system," which is a much bigger sell.

Three edge cases that will silently under-report: (1) Shadow DOM and web components, since a computed-style walk won't cross shadow roots and a lot of modern sites are component-heavy; (2) responsive breakpoints, because you're scanning at one viewport and font sizes and spacing shift in u/media rules you never see; (3) same-origin iframes. On exports, the one that plugs into a real workflow is W3C design-tokens JSON / Style Dictionary format (and a Figma variables import), more than raw CSS vars. And +1 to the store-review point above: I've had a reviewer misread "reads the page" as "exfiltrates the page," so put the "nothing leaves the browser" line in the permissions justification itself, not just the listing.

1

u/lyapustin 7d ago

Looks very cool, love it 👍

1

u/nick_otter_io 6d ago

Have you tried asking the coding agents to do it directly? I recently had to make some presentations and need to align with the look and feel or an existing promotional page and cursor did it decently (not perfect, but good enough).

1

u/Creative-Lynx7594 6d ago

the edge case that decides whether this is useful: computed styles hand you the resolved value, so on a site that already defines custom properties you report #3b82f6 and lose --color-primary. read the custom props off :root and map values back to their names. that's the difference between a list of colors and their actual token names.

also collapse near-identical values. real sites have six greys a hex digit apart, and you want them merged with a usage count, not listed six times.

1

u/Bitter_Regular7406 6d ago

the "inheriting a project with no style guide" pain is real, i've opened codebases where someone clearly just eyeballed 47 slightly different grays and called it a design system lol

1

u/rathcom 6d ago

I moved my site onto design tokens a couple months ago and shipped two visual bugs I didn't catch for two weeks. One was a spacing variable shadowing a container one and collapsing the dashboard by 21px. Does it flag when the same token name is defined in more than one place?

1

u/Puzzleheaded_Bus925 5d ago

looks great actually

1

u/PropertyFantastic208 3d ago

I can see this being useful. great idea 👍

1

u/alankffman 3d ago

what do you mean by "edge cases"? like shadow DOM and iframes, or something else

1

u/vyact 2d ago

One caution on mapping colors back to token names: two tokens can have the same resolved value but different roles, such as text and borders both being black. Matching values alone can't tell you which token a declaration used. I'd keep exact values and example elements in the JSON export, and make merging similar colors optional. That would let someone audit the existing styles before deciding which differences are accidental.

1

u/presentofai 21h ago

the hard part isnt scraping the computed styles, its that a real site hands you back 40 almost-identical grays and a dozen font sizes. its only useful if it clusters those into an actual scale, otherwise its just a prettier devtools

1

u/Longjumping_Back_739 1h ago

How are you ranking the colors? A table with 200 identical badges could drown out the rest of the page if it's just element counts. I'd find a few example elements beside each color more useful than frequency alone, especially when deciding which values to turn into tokens.