Example #1
0
        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));
        }
Example #2
0
 // 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)));
 }