- Module modMain
- Public Function ConvertHTMLToRGBColor(ByVal sHtmlColor As String) As Color
- 'Remove the # if exists
- sHtmlColor = sHtmlColor.Replace("#", "")
- Return Color.FromArgb(System.Convert.ToInt32(sHtmlColor.Substring(0, 2), 16), System.Convert.ToInt32(sHtmlColor.Substring(2, 2), 16), System.Convert.ToInt32(sHtmlColor.Substring(4, 2), 16))
- End Function
- End Module
No comments:
Post a Comment