How can i convert this hexa code = #2088C1 into colour name Like Blue or Red
My aim is i want to get the colour name like “blue” for the given hexa code
I have tried the below code but it was not giving any colour name ..
System.Drawing.Color col = System.Drawing.ColorTranslator.FromHtml("#2088C1");
Color col = ColorConverter.ConvertFromString("#2088C1") as Color;
but it does not giving the colour name like this “aquablue”
I am using winforms applications with c#
I stumbled upon a german site that does exactly what you want:
To get the color name you can use it as follows to get the KnownColor:
However,
System.Color.GetKnownColorseems to be removed in newer versions of .NET