How to turn a website's colors into Tailwind
Pull the colors off any live page, drop the one-off hex values, name what is left by role, and write them into a Tailwind v3 or v4 theme.
A page's colors are already in the browser. The work is deciding which of them are the palette, and which are a one-off badge or a hover state you do not want in the theme. This guide stops at color. For type, spacing, radii, and shadows, use how to extract a design system into Tailwind.
What you are collecting
You want the colors the page uses on purpose: page background, body text, a muted secondary text, borders, and one or two brand colors. You do not want every hex that appears once on an icon.
Step 1: Read the variables the site already named
Sites built with Tailwind v4, shadcn/ui, or an in-house system often put the palette on :root as custom properties. In DevTools, select <html> and look at Styles. If you see --background, --primary, or similar, those names are the palette. Run this in the console to list only the color-like variables:
If this prints a short list of named colors, skip to Step 3. If it prints nothing, the colors are still on the page. They just were not given names.
Step 2: Count the colors the page actually paints
When there are no variables, count computed colors. Values that appear on dozens of elements are the theme. Values that appear once are noise.
Keep the top handful. Drop transparent, pure black from browser defaults if the site never uses it as a brand color, and any color that shows up on a single icon.
Free toolColor palette extractorGet the full color scheme from any webpage like backgrounds, text, borders, shadows and gradients and add to your own library as HEX, RGB and HSL.Step 3: Write them into Tailwind
Name by role, not by the hex. primary still means something when the brand color changes. #7C3AED does not.
Tailwind v4, in your CSS:
bg-background, text-foreground, and bg-primary then work without a config file.
Tailwind v3, in tailwind.config.ts:
The hex values above are placeholders. Replace them with the ones you counted.
What this does not cover
Type, spacing, corner radius, and shadow are the rest of the look. The color names you just wrote are the first block of that theme. The rest of the steps are in extracting a design system into Tailwind. If you also need the font name, start with how to find what font a website uses.
