This Project has been made with one prompt (qwen3.6:35b-a3b , with ollama) in less than an hour using claude code
A K-Nearest Neighbors (KNN) classifier that predicts color names from RGB values.
- Dataset: 200+ named colors with their RGB values
- KNN Engine: From-scratch implementation using Euclidean distance in RGB space
- Prediction: Given RGB values, finds the K most similar colors and predicts the name
projet_knn/
├── app.py # Flask backend
├── data/
│ └── colors.csv # Color dataset (name, r, g, b)
├── src/
│ ├── __init__.py
│ └── knn.py # KNN implementation
├── static/
│ ├── app.js # Frontend logic
│ └── style.css # Styling
├── templates/
│ └── index.html # Main page
└── requirements.txt # Dependencies
pip install -r requirements.txt
python app.pyThen open http://localhost:5000 in your browser.
- Interactive color picker with RGB sliders and number inputs
- KNN prediction with confidence scores and distance metrics
- RGB space visualization showing the input color's position
- Random color button for quick testing
- Adjustable K parameter (1-20)