Nerd alert!
I also had a go at automatically matching 16 input colors with TSE's 16 standard color(name)s, and also failed, though in an expected and not yet solved way.
https://ecarlo.nl/tse/DemosAndTests.html#MatchColorSet
The example below (Sammy’s first request) excellently demonstrates the remaining problem, caused by the tool's aggression and short-sightedness.
The tool first links the two closest matching colors, then for the remaining colors it links the next two closest matching colors, and so on.
It therefore links a new grey color to TSE's very close dark grey color, and then is stuck with linking a new darker grey color to TSE's light grey color.
Given that there are 16! (16 factorial = 21 trillion) color set combinations possible, trying them all is not an option.
I do have a glimmer of an idea for a generic solution, which I am going to let simmer, but may not implement.
For now any next version of this tool is postponed indefinitely.
Carlo
TSE Name | TSE Color | Closest Matched Input Color |
_BLACK_ | 000000 - RGB( 0, 0, 0) | 000000 - RGB( 0, 0, 0) |
_BLUE_ | 000080 - RGB( 0, 0, 128) | 220077 - RGB( 34, 0, 119) |
_GREEN_ | 008000 - RGB( 0, 128, 0) | 007722 - RGB( 0, 119, 34) |
_CYAN_ | 008080 - RGB( 0, 128, 128) | 227788 - RGB( 34, 119, 136) |
_RED_ | 800000 - RGB(128, 0, 0) | 660033 - RGB(102, 0, 51) |
_MAGENTA_ | 800080 - RGB(128, 0, 128) | 770088 - RGB(119, 0, 136) |
_BROWN_ | 808000 - RGB(128, 128, 0) | 996600 - RGB(153, 102, 0) |
_LIGHT_GRAY_ | C0C0C0 - RGB(192, 192, 192) | 444455 - RGB( 68, 68, 85) |
_DARK_GRAY_ | 808080 - RGB(128, 128, 128) | 777799 - RGB(119, 119, 153) |
_LIGHT_BLUE_ | 0000FF - RGB( 0, 0, 255) | 3322FF - RGB( 51, 34, 255) |
_LIGHT_GREEN_ | 00FF00 - RGB( 0, 255, 0) | 00FF33 - RGB( 0, 255, 51) |
_LIGHT_CYAN_ | 00FFFF - RGB( 0, 255, 255) | 22EEFF - RGB( 34, 238, 255) |
_LIGHT_RED_ | FF0000 - RGB(255, 0, 0) | FF0033 - RGB(255, 0, 51) |
_LIGHT_MAG_ | FF00FF - RGB(255, 0, 255) | FF33DD - RGB(255, 51, 221) |
_YELLOW_ | FFFF00 - RGB(255, 255, 0) | FFEE33 - RGB(255, 238, 51) |
_WHITE_ | FFFFFF - RGB(255, 255, 255) | FFFFFF - RGB(255, 255, 255) |
--