Generate HTML to display background color for a built-in R color

col2htmlspan_notext(colorname, character_length = 30)

Arguments

colorname

character string of a built-in R color name

text

character string for text you want to appear over the background color, if any

textcolor

character string for the color of the text you want to appear over the background color, if any

Value

character string with HTML

Examples

col2htmlspan_notext("firebrick4")
#> <span style='background-color:#8B1A1A; color: #8B1A1A;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>