This function determines the Certe theme colour currently used in a markdown document (Quarto or R Markdown), based on the YAML header.

current_markdown_colour(default = "certeblauw")

Arguments

default

default colour

Details

It returns a Certe colour if one is set in the YAML header, and checks in this order:

  1. colour-main

  2. colour-titlepage-titlebanner

  3. colour-titlepage-full

  4. colour-verticalbars

  5. colour-heading1

If none is set, it returns the default setting, which is "certeblauw".

This function is the default to set the theme for tbl_flextable().

It can be also be used for plot2():

# will turn e.g. 'certeblauw' or 'certeroze' based on PDF format settings
library(certeplot2)
admitted_patients |>
  plot2(colour = current_markdown_colour())