nsoption: Improve how we show colours in about:config.

This commit is contained in:
Michael Drake 2020-04-07 20:55:37 +01:00
parent 2da993756c
commit bdd1d2039c
1 changed files with 9 additions and 4 deletions

View File

@ -386,12 +386,17 @@ nsoption_output_value_html(struct nsoption_s *option,
rgbcolour = colour_rb_swap(option->value.c);
slen = snprintf(string + pos,
size - pos,
"<span style=\"font-family:Monospace;\">"
"#%06X"
"</span> "
"<span style=\"background-color: #%06x; "
"color: #%06x; "
"font-family:Monospace; \">#%06X</span>",
"border: 1px solid #%06x; "
"display: inline-block; "
"width: 1em; height: 1em;\">"
"</span>",
rgbcolour,
colour_to_bw_furthest(rgbcolour),
rgbcolour);
rgbcolour,
colour_to_bw_furthest(rgbcolour));
break;
case OPTION_STRING: