In this color detection Python project, you can select any image and click at any point and get its name. So for this, a data file is used that contains the color name and its values. Then the distance from each color is calculated and will find the shortest one.
The project folder contains 3 files:
Color_detection.py – main source code of our project. Colorpic.jpg – sample image for experimenting. Colors.csv – a file that contains our dataset.
The colors.csv file includes 865 color names along with their RGB and hex values.
Steps to run the project:
- Download and unzip the zip file
- Open cmd at the location of this particular file and type the below command:
python color_detection.py -i //add the complete image path