nsoption: Use colour_rb_swap macro.

This commit is contained in:
Michael Drake 2020-04-07 20:53:51 +01:00
parent 30b9c088b0
commit 2da993756c

View File

@ -383,9 +383,7 @@ nsoption_output_value_html(struct nsoption_s *option,
break;
case OPTION_COLOUR:
rgbcolour = (((0x000000FF & option->value.c) << 16) |
((0x0000FF00 & option->value.c) << 0) |
((0x00FF0000 & option->value.c) >> 16));
rgbcolour = colour_rb_swap(option->value.c);
slen = snprintf(string + pos,
size - pos,
"<span style=\"background-color: #%06x; "