Get Cell Color - To get exact color name

Hi,

I am trying to get the colors from excel and have to validate based on the color name using the if condition. I can able to get a few color names and a few colors with the code. Is there any way to convert the colors code into Color Name?

image

image

image

1 Like

you cant get the name for every colour,
so you can do this instead: get R/G/B values for your colour variable and put in dictionary


image

then find the dictionary Key with the greatest value. That key = your colour
Key can either be Red/Green/Blue

e.g. dictionary is

"Red":50
"Green": 100
"Blue": 200

then your result will be Blue

see this for an example
a.xaml (12.3 KB)

It’s not matching Correct, it’s producing an incorrect color name. It’s differentiate only red, green, and blue not other colors.

image

Hi @SrenivasanKanna , Can you please share the sample excel file of color codes?

Sample.xlsx (8.7 KB)