colors - Convert VBColor value to HEX value in C# -


is there way convert vbcolor value hex value in c#? example: &h004080 (vbcolor) #804000 (hex value). or should convert value externally , put converted value code?

here's how done , worked far:

public static string vbcolortohexconverter(string vbcolor)  {   string hexvalue;   string r = "", g = "", b = "";    char[] vbvalue = vbcolor.tochararray();    (int = 0; < vbvalue.length; i++)    {     r = vbvalue[6].tostring() + vbvalue[7].tostring();     g = vbvalue[4].tostring() + vbvalue[5].tostring();     b = vbvalue[2].tostring() + vbvalue[3].tostring();   }    hexvalue = "#" + r + g + b;    return hexvalue; } 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -