示例#1
0
 public Colour Deserialize(string htmlColor)
 {
     return(ColourNameConverter.FromHtmlColor(htmlColor));
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of color from a string.
 /// </summary>
 /// <param name="htmlColor">html color can be either known color name (such as "red", "yellow", "darkblue", etc),
 /// "#aarrggbb" as in html (# is required), "#rrggbb" (# is required, alpha is considered ff) or #rgb </param>
 public Colour(string htmlColor)
 {
     this = ColourNameConverter.FromHtmlColor(htmlColor);
 }