Skip to content
VirgileZZZPublic

About

This Project has been made with one prompt (QWEN3.6:35b-a3b, llamacpp ) in less than an hour using claude code A K-Nearest Neighbors (KNN) classifier that predicts color names from RGB values.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KNN Color Proximity Project

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.

How it works

  1. Dataset: 200+ named colors with their RGB values
  2. KNN Engine: From-scratch implementation using Euclidean distance in RGB space
  3. Prediction: Given RGB values, finds the K most similar colors and predicts the name

Project Structure

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

Setup

pip install -r requirements.txt
python app.py

Then open http://localhost:5000 in your browser.

Features

  • 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)

About

This Project has been made with one prompt (QWEN3.6:35b-a3b, llamacpp ) in less than an hour using claude code A K-Nearest Neighbors (KNN) classifier that predicts color names from RGB values.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages