I wrote small extension for customized Dump, as described here https://www.linqpad.net/CustomizingDump.aspx and stored it in "My Extensions" query. It converts color to its hex representation with accordingly colored font:
static object ToDump(object input)
{
if (input is Color color)
{
var hex = ColorTranslator.ToHtml(Color.FromArgb(color.ToArgb()));
return Util.WithStyle(hex, $"color:{hex}");
}
return input;
}
Workaround (works with nested properties):
I wrote small extension for customized Dump, as described here https://www.linqpad.net/CustomizingDump.aspx and stored it in "My Extensions" query. It converts color to its hex representation with accordingly colored font:
static object ToDump(object input)
{
if (input is Color color)
{
var hex = ColorTranslator.ToHtml(Color.FromArgb(color.ToArgb()));
return Util.WithStyle(hex, $"color:{hex}");
}
return input;
}