12345678910111213141516171819 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace Bowin.Common.Utility
- {
- public static class ColorHelper
- {
- public static string ToRGBString(this System.Drawing.Color color)
- {
- var hexString = string.Format("{0:X}", color.R).PadLeft(2, '0')
- + string.Format("{0:X}", color.G).PadLeft(2, '0')
- + string.Format("{0:X}", color.B).PadLeft(2, '0');
- return hexString;
- }
- }
- }
|