How to dump customize styles?
Options
I have a set, and I want to show the colors according to different conditions
Comments
-
You could use
Util.Highlight()
to change the color of the items you output. Or if you want more control, useUtil.RawHtml()
.var colors = new[] { "red", "orange", "yellow", "green", "blue", "indigo", "violet", }; colors.Select(c => Util.Highlight($"The color {c}", c) ).Dump(); colors.Select(c => Util.RawHtml( new XElement("div", new XAttribute("style", $"color: {c};"), $"The color {c}" ) ) ).Dump();