The text of this article is not in this database — only its details are. Read it on the old site: How to write and read a Color in VB.NET
1 Comment
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: How to write and read a Color in VB.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Epic FaileditedPosted Jul 4, 2010, 2:44 AMEdited Jul 4, 2010, 2:45 AM
Public Function HexToColor(ByVal strHex As String) As Color Return Color.FromArgb(Convert.ToUInt32(strHex, 16)) End Function Public Function ColorToHex(ByVal cColor As Color) As String Return Hex(cColor.ToArgb) End Function Public Function ColorToHex(ByVal R As Byte, ByVal G As Byte, ByVal B As Byte) As String Return Hex(CUInt((R << 16) + (G << 8) + B)) End Function