he<span style='color: #BBBB00;'>llo</span>
<span style='color: #BBBB00;'>wor</span><span style='color: #BBBB00; background-color: #0000BB;'>ld</span>

[1] "he<span style='color: #BBBB00;'>llo</span>"                                                                
[2] "<span style='color: #BBBB00;'>wor</span><span style='color: #BBBB00; background-color: #0000BB;'>ld</span>"

[1] "hello"                                     
[2] "<span style='color: #BBBB00;'>world</span>"

hello
<span style='color: #BBBB00; background-color: #0000BB;'>world</span>

[1] "hello"                                                                
[2] "<span style='color: #BBBB00; background-color: #0000BB;'>world</span>"

hello
<span style='color: #BBBB00;'>wor</span><span style='color: #BBBB00; background-color: #0000BB;'>ld</span>

[1] "hello"                                                                                                     
[2] "<span style='color: #BBBB00;'>wor</span><span style='color: #BBBB00; background-color: #0000BB;'>ld</span>"

Argument `x` must be a five row integer matrix.

Error in fansi:::esc_color_code_to_html(matrix(1:12, 4)) : 
  Argument `x` must be a five row integer matrix.

Error in to_html_int(x = x, warn = warn, term.cap = term.cap, classes = classes,  : 
  Argument `warn` must be TRUE or FALSE.

Error in to_html_int(x = x, warn = warn, term.cap = term.cap, classes = classes,  : 
  Argument `term.cap` must be character.

Argument `term.cap` may only contain values in c("all", "bright", "256", "truecolor", "old")

Error in to_html_int(x = x, warn = warn, term.cap = term.cap, classes = classes,  : 
  Argument `term.cap` may only contain values in c("all", "bright", "256", "truecolor", "old")

[1] "<span style='color: #BB0000;'>hello</span>"     
[2] "<span style='color: #BB0000;'>world</span> moon"

[1] "<span style='font-style: italic;'>hello</span>"     
[2] "<span style='font-style: italic;'>world</span> moon"

<span class='fansi-color-012'>hello</span><span class='fansi-color-001 fansi-bgcol-002' style='font-weight: bold;'>world</span>