Auto white balance correction for digital images using professional color science.
- Bradford Chromatic Adaptation: Professional-grade white balance using perceptually accurate transform
- Ensemble Illuminant Detection: Combines Gray World, Shades of Gray, and White Patch algorithms
- Smart Adaptive Correction: Per-pixel weighting based on luminance, saturation, and warmth
- Neutral Guards: Prevents overcorrection with automatic feedback loops
- Skin Tone Preservation: Intelligent protection of natural skin colors
- Real-time Processing: Instant preview with adjustable parameters
- Download Support: Save corrected images as high-quality JPEG
- Dark/Light Theme: Clean interface with system preference detection
- Client-side Processing: No uploads required - everything runs in your browser
- Upload Image: Drag and drop or select an image file (JPEG/PNG/WebP)
- Automatic Analysis: App detects color temperature and warmth levels (0-100 scale)
- Adjust Parameters:
- Strength: Correction intensity (0-100%)
- Preserve Skin: Protects skin tones from over-correction
- Auto-Correct: Enables tone curve and contrast enhancement
- Keep Whites Neutral: Prevents neutral colors from shifting
- Neutral Bias: Fine-tune the neutral point
- Vivid: Restores color saturation (0-100%)
- Compare Results: Interactive before/after slider
- Download: Click button to save corrected image
The app uses the Bradford chromatic adaptation transform, which models human visual adaptation:
- Illuminant Estimation: Weighted ensemble of detection methods
- Color Space Transform: RGB → XYZ → LMS cone space
- Diagonal Scaling: Adapt between source and target illuminants
- Perceptual Application: Per-pixel weighting based on image characteristics
- Gray World: Assumes average scene color should be neutral
- Shades of Gray: Higher-order statistics with Minkowski norm (p=6)
- White Patch: Brightest pixels as reference whites
- Dynamic Weighting: More reliance on White Patch for stronger casts
- Luminance Weighting: More correction in mid-tones, less in highlights
- Saturation Boost: Restores colors lost during white balance
- Warmth Targeting: Focuses correction on warm/yellow areas
- Neutral Protection: Iterative feedback to prevent blue shifts
# Install dependencies
pnpm install
# Start development server
pnpm run dev
# Build for production
pnpm run build
# Preview production build
pnpm run previewThis app is configured for GitHub Pages deployment. Push to the main branch to automatically deploy via GitHub Actions.
- Framework: Svelte 5 with TypeScript
- Build Tool: Vite
- Performance: 12-30ms analysis on 12MP images, 120-400ms full correction
- Color Science: D65 illuminant, accurate sRGB ↔ CIELAB conversions
- Browser Compatibility: Modern browsers with Canvas API support
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.
You are free to:
- Share and redistribute the material
- Adapt, remix, and build upon the material
Under the following terms:
- Attribution — You must give appropriate credit
- NonCommercial — You may not use the material for commercial purposes
See the LICENSE file for full details.