How to get the background Color name of an element | Selenium Forum
V
Vinay Krishna Posted on 09/03/2019

Hello,

Is there any way to get the Color names of the back ground color of an element. I am able to retrieve colors in RGB and HEX forms but not able to convert that to Orange, Green or Blue color names.

I googled it and it says we need to have a list of color names -RGB values mapping and application RGB values needs to be compared with that list to get the color name. Is that the only option ?

 

Thanks

Vinay


A
Ashish Thakur Replied on 12/03/2019

You can look up on the internet, usually the first two characters denote part of Red, next two denote part of Green and the last two denote part of Blue

 


V
Vinay Krishna Replied on 13/03/2019

my query is can we convert the RGB or HEX to color names through coding ?


A
Ashish Thakur Replied on 14/03/2019

Please refer the page https://www.w3schools.com/colors/colors_converter.asp


V
Vinay Krishna Replied on 30/03/2019

thank you, this can be closed