Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my application i am using color dialog if select black i get color.name as black but i select different color that it gives hex decimal value , how to convert hex decimal value to color name
Posted

Get all the color names, and put them in a dictionary using their hex value as the key. Check the dictionary to see if the hex value you are working with exists. If it does, get the value out of the dictionary and you have your color name.
 
Share this answer
 
If you really want the color name, can't help.
But if you require color object from that Hex value, then you can use

VB
Dim c As Color = ColorTranslator.FromHtml("#25A595")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900