current_markdown_colour: Get Current Markdown Colour

View source: R/rmarkdown.R

current_markdown_colourR Documentation

Get Current Markdown Colour

Description

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

Usage

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())

certe-medical-epidemiology/certestyle documentation built on July 12, 2024, 2:45 p.m.