Unified Branding with a Simple YAML File

Read and process 'brand.yml' 'YAML' files. 'brand.yml' is a simple, portable 'YAML' file that codifies your company's brand guidelines into a format that can be used by 'Quarto', 'Shiny' and 'R' tooling to create branded outputs. Maintain unified, branded theming for web applications to printed reports to dashboards and presentations with a consistent look and feel.


brand.yml

CRANstatus r-universe statusbadge R-CMD-check

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"

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("brand.yml")

0.1.0 by Garrick Aden-Buie, a year ago


https://posit-dev.github.io/brand-yml/pkg/r/, https://github.com/posit-dev/brand-yml


Report a bug at https://github.com/posit-dev/brand-yml/issues


Browse source code at https://github.com/cran/brand.yml


Authors: Garrick Aden-Buie [aut, cre] (ORCID: , Posit Software , PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, rlang, utils, yaml

Suggests base64enc, dplyr, flextable, ggiraph, ggplot2, gt, htmltools, knitr, mime, palmerpenguins, patchwork, plotly, prismatic, rmarkdown, sass, stringr, testthat, thematic, tidyr, tidyverse, withr


Imported by visOmopResults.

Suggested by OmopViewer, aurora, bslib, shinyGovstyle, washr.


See at CRAN