You land on a competitor's website or a beautiful Dribbble portfolio, and the aesthetic completely blows you away. It's not just the button color that looks great—it's the exact harmony between the dark background, the subtle gray text, and the vibrant primary accent. You don't just want one color; you want the entire color palette.
Extracting a complete color palette from a website is incredibly useful for competitor analysis, building mood boards, and finding UI inspiration. Rather than using a basic eyedropper tool 10 different times to guess the structure, modern designers use automated tools, CSS root variables, and image scanners to grab the entire 5-color scheme in seconds.
In this guide, we will show you exactly how to steal like an artist. We will cover the best Chrome extensions, the hidden CSS :root trick, and provide a raw JavaScript code snippet to scrape colors from any DOM. Want to try it instantly? Paste a screenshot of any website into our scanner below!
✨ Try It: Website Palette Extractor Simulator
Click any generated color swatch to instantly copy its HEX code. Note: Screenshot scanning happens 100% locally in your browser for total privacy.
✦ Why Extract a Full Palette? (The 60-30-10 Rule)
Picking a single primary color is easy, but making it look good is hard. Great web design relies on balance, commonly known as the 60-30-10 Rule. When you extract a palette from a beautifully designed website, you aren't just getting colors; you are getting a proven, balanced mathematical ratio.
- 60% Background Colors: Usually deep darks or stark whites. This is the canvas.
- 30% Secondary/UI Colors: Used for sidebars, footer sections, and borders.
- 10% Accent Colors: Highly saturated, contrasting colors used exclusively for Call-to-Action (CTA) buttons and links.
By extracting the whole palette, you ensure that you grab the exact soft gray they used for text that perfectly complements their vibrant accent color, maintaining complete visual harmony.
🔌 Method 1: Chrome Extensions (The Fastest Way)
CSS Peeper (Designer Favorite)
CSS Peeper is built specifically for UI/UX designers. Instead of digging through code, you click the extension, and it immediately generates a clean, visual grid of every single HEX code used on the site, organized by backgrounds, text, and accents. You can even export the entire palette.
Site Palette
Another incredible tool is Site Palette. It doesn't just list the colors; it categorizes them into different extraction algorithms (like Color Thief and Material Design) and allows you to generate shareable links or instantly export the palette directly to Adobe Swatch Exchange (.ase) format.
🛠️ Method 2: The DevTools :root Trick (No Extensions)
If you don't want to install extensions, you can find the entire palette hidden in plain sight. Modern websites (especially those built with React, Vue, or Tailwind) use CSS Custom Properties (Variables) to manage their themes. These are almost always stored in the :root element.
- Right-click anywhere on the target website and click Inspect to open Chrome DevTools.
- In the Elements tab, scroll to the very top of the DOM tree and click on the
<html>tag. - Look at the Styles pane on the right side.
- Scroll down until you see the
:root { ... }block. - Boom! You will likely see a perfectly organized list of the entire palette, looking something like:
--color-primary: #3b82f6;--color-bg-dark: #0f172a;
📸 Method 3: Screenshot Palette Generators
Sometimes, a website's CSS is too obfuscated, or you only want the colors from a specific hero image or promotional banner. In this case, visual extraction is best.
Simply take a screenshot of the website (Cmd+Shift+4 on Mac, Win+Shift+S on Windows). Then, upload that screenshot to a tool like:
- Canva Color Palette Generator: Upload any image, and Canva instantly picks 4 dominant colors and provides their HEX codes.
- Coolors.co: The best palette generator on the internet. Their "Image Picker" tool lets you upload a screenshot and physically drag markers around to refine the automatically generated palette.
- Our Tool Above: We built a local canvas-based scanner in the interactive section above. Paste a screenshot, and it will calculate RGB distances to give you 5 distinct UI colors!
🚀 Ready to Build Your Own Palette?
Don't just copy—innovate! Use our advanced color wheel tool to tweak the extracted colors and create your own unique brand identity.
Open Advanced Color Wheel →💻 Method 4: The JavaScript Console Scraper
Open Chrome DevTools, click on the Console tab, paste this code, and press Enter:
// Script to extract all unique background colors from a website
const colors = new Set();
document.querySelectorAll('*').forEach(el => {
const bg = window.getComputedStyle(el).backgroundColor;
// Ignore transparent backgrounds
if (bg !== 'rgba(0, 0, 0, 0)' && bg !== 'transparent') {
colors.add(bg);
}
});
console.log([...colors]); This script will output an array of RGB values. You can easily modify it to grab the color property for text colors as well. This is exactly how the basic Chrome extensions work under the hood!
⚖️ Is it Legal to Copy a Website's Color Palette?
When designers learn how to extract palettes, their first question is usually: Can I get sued for using Apple or Stripe's exact color scheme?
The Short Answer: Yes, it is legal.
Under US Copyright Law, you cannot copyright a raw HEX code, nor can you copyright a basic combination of colors. Colors are considered "building blocks" of nature and design.
Best Practice: Steal the palette, but change the typography, the layout, and the context. Use their brilliant color math as a foundation for your own unique design.
❓ Frequently Asked Questions
What is the best Chrome extension to extract a color palette?
CSS Peeper and Site Palette are currently the best extensions. CSS Peeper is designed specifically for designers to extract entire color schemes and assets from a website in one click without touching code.
Is it legal to copy a website's color palette?
Yes, you cannot copyright a raw HEX code or a basic color combination. However, if you copy their exact layout, typography, and color palette together, you may violate "Trade Dress" or trademark laws by mimicking their brand identity.
How do I extract a palette from an image?
You can take a screenshot of a website and upload it to palette generators like Canva Color Palette Generator, Coolors.co, or the interactive Image Scanner tool on this page to automatically extract the dominant colors.
How do I get all colors from a website using JavaScript?
You can write a script in the browser console that iterates through all DOM elements (document.querySelectorAll('*')), uses getComputedStyle() to read the background-color and color properties, and pushes unique values into a Set or Array.
Where do modern websites store their color palettes?
Most modern websites (especially those using frameworks like React, Vue, or Tailwind) store their global color palette in the CSS :root element as Custom Properties (e.g., --primary: #FF0000;). You can view this easily using the Inspect Element tool.