TextStyle _customTextStyle(HtmlNode node, TextStyle baseStyle) { var style = new TextStyle(); if (node.Attributes["color"] != null) { style = style.copyWith(color: new Color(ColorsFromName.ColorFromName(node.Attributes["color"].Value))); } return(baseStyle.merge(style)); }
// A helper function to get ui.Color directly from color name // with the help of System.Drawing.Color private Color ColorFromName(string name) { return(new Color(ColorsFromName.ColorFromName(name))); }