| get_brand_color | R Documentation |
get_brand_color() retrieves color codes from the _brand.yml file.
get_brand_color(color, alpha = NULL)
color |
A |
alpha |
(Optional) A number between |
_brand.ymlbrandr will always look for a _brand.yml file in the root directory of
your project. If the file is not found, an error message will be displayed.
You can also set the path to the file manually using the
options() function:
options(BRANDR_BRAND_YML = "PATH_TO_BRAND.YML")
A character vector with
hexadecimal color codes.
Other utility functions:
get_brand_color_mix(),
get_brand_color_tint(),
get_brand_font()
get_brand_color("primary")
#> [1] "#DA4E3C" # Expected
get_brand_color("secondary")
#> [1] "#390963" # Expected
get_brand_color("tertiary")
#> [1] "#FB9706" # Expected
get_brand_color("tertiary", alpha = 0.5)
#> [1] "#FB970680" # Expected
get_brand_color(c("primary", "secondary"))
#> [1] "#DA4E3C" "#390963" # Expected
get_brand_color(c("red", "purple", "orange"))
#> [1] "#DA4E3C" "#390963" "#F06F20" # Expected
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.