The iosp
package provides the add_box_colour(name, bg, bg_header, text, text_header)
function to declare additional background colours. Where:
name
is the mandatory name of the new colour (which will be prefixed withbg-
if it is omitted).bg
is the mandatory background colour in a format recognized bycol2rgb()
:- A colour name listed by
colours()
. - A hexadecimal colour code (e.g.
#FF11GG
).
- A colour name listed by
header_bg
is the optional header background colour.text
is the optional text colour. Iftext = NULL
, the text will be either black or white depending onbg
(using the algorithm presended in this post).header_text
is the optional header text colour. Ifheader_text = NULL
, the text will be either black or white depending onheader_bg
.