Learn R Programming

brand.yml

Centralize brand guidelines in a single ‘brand.yml’ file, enabling consistent theming across Quarto, Shiny, R applications, reports, and presentations with minimal configuration.

Installation

Install the latest release of brand.yml from CRAN with:

install.packages("brand.yml")

You can install the development version of brand.yml from GitHub with:

# install.packages("pak")
pak::pak("posit-dev/brand-yml/pkg-r")

Alternatively, you can install from posit-dev.r-universe.dev with:

install.packages(
  'brand.yml',
  repos = c('https://posit-dev.r-universe.dev', 'https://cloud.r-project.org')
)

Example

Use read_brand_yml() to read in a brand.yml file into a validated and consistent R list. You can provide a path to a local file, or read_brand_yml() will look for a _brand.yml file in your project.

library(brand.yml)

brand <- read_brand_yml(
  system.file("examples", "brand-posit.yml", package = "brand.yml")
)

brand$color |> str()
#> List of 12
#>  $ palette   :List of 7
#>   ..$ blue    : chr "#447099"
#>   ..$ orange  : chr "#EE6331"
#>   ..$ gray    : chr "#404041"
#>   ..$ white   : chr "#FFFFFF"
#>   ..$ teal    : chr "#419599"
#>   ..$ green   : chr "#72994E"
#>   ..$ burgundy: chr "#9A4665"
#>  $ foreground: chr "#151515"
#>  $ background: chr "#FFFFFF"
#>  $ primary   : chr "#447099"
#>  $ secondary : chr "#707073"
#>  $ tertiary  : chr "#C2C2C4"
#>  $ success   : chr "#72994E"
#>  $ info      : chr "#419599"
#>  $ warning   : chr "#EE6331"
#>  $ danger    : chr "#9A4665"
#>  $ light     : chr "#FFFFFF"
#>  $ dark      : chr "#404041"

Copy Link

Version

Install

install.packages('brand.yml')

Monthly Downloads

1,514

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Garrick Aden-Buie

Last Published

November 6th, 2025

Functions in brand.yml (0.1.0)

theme_brand_thematic

Create a thematic theme using brand colors
theme_brand_plotly

Create a plotly theme using brand colors
theme_brand_flextable

Create a flextable theme using brand colors
with_brand_yml_path

Temporarily set the BRAND_YML_PATH environment variable
theme_brand_ggplot2

Create a ggplot2 theme using brand colors
brand_pluck

Extract a nested element from a brand object
brand.yml-package

brand.yml: Unified Branding with a Simple YAML File
brand_color_pluck

Extract a color value from a brand object
as_brand_yml

Create a Brand instance from a list or character vector.
brand_has

Check if a brand has a specific nested element
brand_sass_typography

Generate Sass variables for brand typography
brand_sass_fonts

Generate Sass variables and CSS rules for brand fonts
brand_sass_color

Generate Sass variables for brand colors
brand_sass_defaults_bootstrap

Generate Sass variables and layer for Bootstrap defaults
brand_sass_color_palette

Generate Sass variables and CSS custom properties for brand color palette
theme_brand_gt

Create a gt table theme using brand colors
read_brand_yml

Create a Brand instance from a Brand YAML file.
brand_use_logo

Extract a logo resource from a brand