coloured_text.Rd
Colour specific text in a html document
coloured_text(colour, ...)
In quarto/Rmarkdown documents, use the function in an inline R chunk
(`r coloured_text(...)`
) or in an R chunk with the result set to asis
coloured_text("red", "This text should be red")
#> <span style="color:red; ">This text should be red</span>
# also works with multiple contents
coloured_text("red", "This text should be red", "this one too")
#> <span style="color:red; ">
#> This text should be red
#> this one too
#> </span>
# For multiple colours, use multiple calls to the function:
coloured_text("red", "this is red,")
#> <span style="color:red; ">this is red,</span>
coloured_text("blue", "and this is blue!")
#> <span style="color:blue; ">and this is blue!</span>