brand_sass_color_palette: Generate Sass variables and CSS custom properties for brand...

View source: R/sass.R

brand_sass_color_paletteR Documentation

Generate Sass variables and CSS custom properties for brand color palette

Description

Converts color palette entries from a brand object to Sass variables with ⁠brand-⁠ prefix and CSS custom properties with ⁠--brand-⁠ prefix.

Usage

brand_sass_color_palette(brand)

Arguments

brand

A list or string of YAML representing the brand, or a path to a brand.yml file.

Value

A list with two components:

  • defaults: Sass variable definitions with !default flag

  • rules: CSS rules that define custom properties in ⁠:root⁠

See Also

Other brand.yml Sass helpers: brand_sass_color(), brand_sass_defaults_bootstrap(), brand_sass_fonts(), brand_sass_typography()

Examples

brand <- list(
  color = list(
    palette = list(
      primary = "#007bff",
      secondary = "#6c757d"
    )
  )
)

brand_sass_color_palette(brand)


brand.yml documentation built on Nov. 6, 2025, 5:06 p.m.