Is there any way to convert a string to hexa and then to convert it to a .Net color?
I would like to know how to convert a string of color ,say Black, to its Hexa '#000000' ?
i.e. if my input is "Black", i should return "#000000"
My issue is:
i'm setting color and storing its name in an object. So, if it is white, the object keeps "white" ,but for certain shades, it is keeping the name as f12a12 ( an example). I appended "0x" befor such strings and it worked fine with the colortranslator. In case of the normal colors in Color object, i dont want to append this. I can make the string to search through the Colors but i would like to know whether there is any other way to do this?