A beautiful web app for extracting color palettes from images using the OKLCH color space. Upload an image and get 11 unique palette variations instantly!
- 🖼️ Bulk Image Upload - Upload multiple images at once via drag-and-drop or file picker
- 🎨 11 Palette Variations - Get diverse color schemes from a single image
- 💡 Highlighter Mode - Calculates maximum possible vibrancy for each hue
- 🌈 OKLCH Format - Modern color space with better perceptual uniformity
- 📋 Easy Copying - Click any color to copy to clipboard
- 💾 Export Options - Export all palettes as CSS variables
- ✨ Beautiful UI - Modern, responsive design with smooth animations
Each uploaded image generates these distinct palettes:
- Extracted Colors - Original dominant colors from the image (k-means clustering)
- Soft Pastels - Gentle, muted version (↑ lightness, ↓ chroma)
- Complementary - Opposite colors (inverted lightness, +180° hue)
- Vibrant Bold - Highly saturated, punchy colors (↑↑ chroma)
- 🔥 Highlighter Neon - MAXIMUM possible chroma at optimal lightness (L=0.8)
- Monochrome - Grayscale version (chroma = 0)
- Dark Mode - Deep, dark tones (↓↓ lightness)
- Neon Electric - Maximum saturation glow effect
- Analogous Harmony - Adjacent color wheel (+30° hue)
- Warm Tones - Shifted toward red/orange/yellow
- Cool Tones - Shifted toward blue/cyan
The Highlighter Neon palette uses a sophisticated algorithm to calculate the absolute maximum chroma possible for each hue:
How it works:
- Sets lightness to 0.8 (the "highlighter sweet spot" where colors appear to glow)
- Calculates hue-specific maximum chroma:
- Yellow-Green (60-120°): ~0.37 (highest)
- Red (0-30°, 330-360°): ~0.33
- Purple/Magenta (270-330°): ~0.32
- Blue (240-270°): ~0.31
- Cyan (180-210°): ~0.29
- Adjusts for lightness constraints (chroma capacity varies with L)
- Creates that fluorescent, highlighter marker effect
This palette will always give you the most vibrant possible color for each hue! 🔥
# Install dependencies
npm install
# Or using pnpm
pnpm install# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- Downscales image to ~150px for efficient processing
- Extracts unique colors with quantization (reduces near-duplicates)
- Uses k-means++ clustering for optimal color grouping
- Weights colors by frequency for accurate representation
All 9 variations are generated by manipulating OKLCH components:
- L (Lightness): 0-1 (dark to light)
- C (Chroma): 0-0.37 (gray to saturated)
- H (Hue): 0-360° (color wheel position)
Click "Export" to download CSS with all 10 palettes:
:root {
/* Extracted Colors */
--primary-1: oklch(0.5 0.2 270);
--primary-2: oklch(0.6 0.15 330);
/* Soft Pastels */
--soft-1: oklch(0.85 0.08 270);
/* Complementary */
--inverted-1: oklch(0.5 0.2 90);
/* ... all 10 palettes */
}- Vite - Fast build tool and dev server
- Culori - Professional color conversion library with OKLCH support
- Vanilla JS - No framework overhead, pure performance
- Canvas API - Image processing and color extraction
OKLCH (Oklch color space) offers several advantages:
- ✅ Better perceptual uniformity than HSL
- ✅ More colors than sRGB (supports P3, Rec2020)
- ✅ No hue shift when changing chroma/lightness
- ✅ Native CSS support in modern browsers
- ✅ Predictable color transformations
- 🎨 Design Systems - Generate comprehensive color palettes
- 🖼️ Brand Guidelines - Extract colors from logo/images
- 🌐 Web Design - Get instant theme variations
- 📱 App Development - Create light/dark mode palettes
- 🎭 Accessibility - Test contrast with monochrome palette
MIT
Inspired by oklch-picker by Evil Martians