Skip to contents

[DT][echarts4r][ggplot2][gt][plotly]

Returns hex code(s) of color_name. All 18 RIVM colors and their lighter shades can be accessed with this function. The names of RIVM colors are listed at the rijkshuisstijl website, or, can be viewed by running another ROvis function ro_show_colors.

To access a vector of hex color codes of the categorical palette, use the ROvis

function ro_color_categorical.

Usage

ro_color(color_name = "hemelblauw")

Arguments

color_name

Character or vector of characters. Default="hemelblauw". Can be one of:

  • The name of an RIVM color, e.g. "robijnrood". All colors come at different shades: 'tint15', 'tint30', 'tint45', 'tint60', or 'tint75'. A color shade can be accessed by combining the color name with the suffix "_tintXX". The seven grey tints are available as 'grijs_1' (lightest) to 'grijs_7' (darkest).

  • A character vector of RIVM color names. Example: c("hemelblauw", "donkergeel")

Value

returns the (array of) hex color code(s)

Examples

ro_color()
#> [1] "#007bc7"
ro_color("robijnrood")
#> [1] "#ca005d"
ro_color("donkergeel_tint75")
#> [1] "#fdc84d"
ro_color("grijs_3")
#> [1] "#cccccc"
ro_color(c("lintblauw", "robijnrood", "mintgroen_tint30"))
#> [1] "#154273" "#ca005d" "#d5f1e9"