A modern Chrome extension that extracts and displays the complete color palette from any webpage. Perfect for designers, developers, and anyone who wants to analyze website color schemes.
- Automatic Color Extraction: Scans all DOM elements for colors using computed styles
- Comprehensive Detection: Finds colors in text, backgrounds, borders, outlines, and gradients
- Real-time Updates: Automatically detects dynamically added styles using MutationObserver
- CSS Variables Support: Extracts colors from CSS custom properties
- Dual View Modes: Grid and list views for different preferences
- Smart Sorting: Sort by frequency, hue, brightness, or contrast ratio
- Color Details Modal: Click any color for detailed information
- Loading States: Smooth loading and empty state handling
- Responsive Design: Works perfectly on different screen sizes
- Multiple Formats: HEX, RGB, HSL, and HSV values
- Contrast Analysis: WCAG-compliant contrast ratios against white/black
- Visual Previews: Large color swatches with transparency indicators
- Frequency Tracking: Shows how often each color is used
- JSON: Simple array of hex values
- SCSS Variables: Ready-to-use SCSS color variables
- CSS Variables: Modern CSS custom properties
- CSV: Spreadsheet-friendly format with multiple color formats
- Local Processing: All color extraction happens locally
- No Tracking: Zero analytics or data collection
- No Server: Everything stays on your device
- Minimal Permissions: Only requests necessary access
- Clone or download this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension folder
- The extension icon should appear in your toolbar
- Create a
icons/folder with icon files:icon16.png(16x16)icon32.png(32x32)icon48.png(48x48)icon128.png(128x128)
- Zip the entire folder
- Submit to Chrome Web Store
- Navigate to any webpage
- Click the ColorPaletteExtractor icon in your toolbar
- The extension will automatically extract all colors
- Browse the color palette in grid or list view
- Switch Views: Toggle between grid and list layouts
- Sort Colors: Use the dropdown to sort by different criteria
- Color Details: Click any color swatch for detailed information
- Export Palette: Choose your preferred format and download
- Refresh: Click the refresh button to re-extract colors
When you click a color, you'll see:
- Large color preview
- All color format values (HEX, RGB, HSL, HSV)
- Contrast ratio tests against white and black backgrounds
- WCAG compliance indicators
- Manifest V3: Latest Chrome extension standard
- Modular Design: Clean separation of concerns
- ES6+: Modern JavaScript with modules
- CSS Variables: Consistent theming system
- Computed Styles: Uses
getComputedStyle()for accurate color values - Gradient Parsing: Extracts individual colors from CSS gradients
- CSS Variables: Detects colors in custom properties
- Frequency Tracking: Counts color usage across the page
- Debounced Updates: Prevents excessive processing on dynamic pages
- Efficient DOM Traversal: Optimized element selection
- Memory Management: Proper cleanup and resource handling
ColorPaletteExtractor/
βββ manifest.json # Extension configuration
βββ popup.html # Main UI
βββ popup.js # UI logic and interactions
βββ content.js # Color extraction script
βββ background.js # Service worker
βββ utils/
β βββ colors.js # Color utilities and conversions
βββ styles/
β βββ popup.css # Modern UI styling
βββ icons/ # Extension icons (add your own)
βββ icon16.png
βββ icon32.png
βββ icon48.png
βββ icon128.png
- HEX:
#ff0000,#f00,#ff0000ff - RGB:
rgb(255, 0, 0),rgba(255, 0, 0, 0.5) - HSL:
hsl(0, 100%, 50%),hsla(0, 100%, 50%, 0.5) - Gradients:
linear-gradient(),radial-gradient() - CSS Variables:
var(--color-primary)
- Chrome browser
- Basic knowledge of HTML, CSS, JavaScript
- Make changes to the code
- Go to
chrome://extensions/ - Click the refresh icon on the extension
- Test your changes
- Add your icon files to the
icons/folder - Test thoroughly on various websites
- Update version in
manifest.json - Create a zip file for distribution
Contributions are welcome! Here are some areas for improvement:
- Icon Design: Create beautiful extension icons
- Additional Export Formats: Add more export options
- Color Analysis: Enhanced color theory features
- Performance: Optimize for very large pages
- Accessibility: Improve screen reader support
This project is open source and available under the MIT License.
- Chrome Extensions API documentation
- WCAG contrast ratio guidelines
- Modern CSS and JavaScript best practices
- The design and development community
Made with β€οΈ for designers and developers who love beautiful color palettes!