Hello,
## overview
If you check out istockphoto's advanced image search [ [login to view URL] ],
you can select the colors in which you which to search for.
I'm trying to copy this function for another project.
## Your task.
I need a C# script.
*I will use it with a both winforms and winforms*. Your script will receive a file path.
eg "c:\temp\images\[login to view URL]"
Your function will open the image, scan the image, and return a **data table** of all the colors in the image:
1. the # hex value for the color
2. the rgb vlue (102, 102, 102)
3. % of the image that color appeared.
4. the nearest similar color from a list or primary colors.
eg:
| b00b7 | (102, 102, 32) | 10.22 | #0247FE |
| 00f0f0 | (142, 102, 12) | 44.77 | #66B032 |
| 440019 | (12, 32, 102) | 2 | #0247FE |
these numbers are just an idea, the values are random
list of primary colors:
#0247FE
#0392CE
#66B032
#D0EA2B
#FEFE33
#FABC02
#FFCC99
#FD5308
#FD1408
#A7194B
#FD08F4
#8601AF
#3D01A4
#663300
#000000
I believe much of the c# source code you need is here:
[login to view URL]
## finally
If you have smarter way to do this, or any recommendations let me know.