I wanted to set the forecolor of a cell to a given color if that exists in the excel.Colors collection. First of all I recognized that the colors collection with version 220.127.116.11 was totally empty. I tried it with version 18.104.22.168 and the collection had 56 entries. Fine. But, trying to find any color within the collection with the mentioned function didn’t work. I tried Color.FromKnownColor, Color.FromArgb, Color.FromHtml. I had one match, I think it was color entry 54, and that only with the Color.FromHtml function. All the other ones didn’t result in a match.
After that i wrote my own IsColorInPalette function and compared the colors with equals. That didn’t work. I assured myself the colors were equal. A, R, G and B were totally equal. So in the end, I compared the A,R,G,B values of the instances to get a match.
I tried the same with the new Hotfix 22.214.171.124. - same problem.
Any proposals or hints? Am I doing something wrong?
Thanks in advance
Thanks for your feedback. It’s fixed in the latest hotfix . Please download it and have a try.
It works pretty fine - thanks for the quick response.