Hook for use with knitr. Must have knitr and fansi installed to use. Must be within a block that has results = "asis" (though may be echo = FALSE) as we output some style.

lol_hooks(background = "#222222", plain = "#eeeeee")

Arguments

background

Colour to use for the background (any valid CSS specification). The default is quite dark grey, which works well with the default colour theme.

plain

Colour to use for unstyled text; practically this is any knitr pre-output prompt like #>. Should contrast against background. The default is very light grey.

Value

Invisibly, an argument-less function that will restore the previous state before running this function.