i want to build a color picker that picks color from the screen.
but i dont want my program to return the hex value but i want it to return color's name. let's say someone picks the color "#272829" now to us humans this looks like the color black. so i want it to return "the color is black"
here is an example of the colors which i want to be considered the color "black"
in that picture i want that all those colors that i've marked to be "black", so if someone picks one of these colors it will say "the color is black"
how can i accomplish that ?
If you want to achieve this by yourself, an idea to solve this could be using RGB color codes instead of hex values. As the three arguments define the amount of each color (Red, Green and Blue) you can try to guess which color is picked by doing something like this :
This is the main idea, then, you can adjust condition for each color amount to handle all cases :
Otherwise, there are some tools to do this : https://chir.ag/projects/ntc/
Hope this would help you!