Daksahaini/color-space-explorer
๐จ Color Space Explorer
An interactive educational app for the Intro to Image Analysis course at the University of Bern (2026).
Project Summary
This app teaches four image analysis concepts through interactive visualisation: colour space decomposition (RGB, HSV, LAB, YCbCr, Grayscale), gamma correction, white balance adjustment, and colour blindness simulation. The user can upload any image or use a built-in sample, then explore how each concept transforms the image in real time.
Hugging Face Space
๐ [https://huggingface.co/spaces/Daksahaini/color-space-explorer](https://huggingface.co/spaces/Daksahaini/color-space-explorer)
What it does
Features
- Upload your own image or use a built-in sample (3 included)
- Switch between 5 colour spaces instantly
- Side-by-side input / output comparison in every tab
- Per-channel visualisation, histograms, and pixel colour-cloud scatter plot
- Interactive HSV editor (hue shift, saturation, brightness)
- Gamma correction with live gamma curve plot
- White balance with per-channel delta metrics
- Color blindness simulation with difference heatmap
- Quantitative metrics: colourfulness, brightness, saturation, contrast
Local Setup
git clone https://huggingface.co/spaces/Daksahaini/color-space-explorer
cd color-space-explorer
pip install -r requirements.txt
streamlit run app.pyFile Structure
โโโ app.py # Main Streamlit application
โโโ processing.py # Image transformation functions
โโโ metrics.py # Quantitative metric calculations
โโโ utils.py # Sample image generation & helpers
โโโ requirements.txt
โโโ README.md
โโโ Dockerfile
โโโ sample_images/ # Auto-generated on first run
โโโ docs/
โโโ design_choices.md # Design decisions and rationaleScreenshots
<img src="screenshots/screenshot_colorspaces.png" width="700"/>
<img src="screenshots/screenshot_gamma.png" width="700"/>
<img src="screenshots/screenshot_colorblindness.png" width="700"/>
Known Limitations
- White balance uses a simple linear adjustment. Real photo editors are more precise.
- Color blindness simulation is an approximation โ it does not perfectly match every person's vision.
- Gamma correction changes the whole image equally. It cannot treat dark and bright areas separately.
- Large images are resized to 800 px automatically. Some fine detail may be lost.
- The app runs on a free server, so processing may be slow for very large images.
