get_brand_color {brandr} | R Documentation |
Get brand colors
Description
get_brand_color()
retrieves color codes from the _brand.yml
file.
Usage
get_brand_color(color, alpha = NULL)
Arguments
color |
A |
alpha |
(Optional) A number between |
Details
Path to _brand.yml
brandr
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")
Value
A character
vector with
hexadecimal color codes.
See Also
Other utility functions:
get_brand_color_mix()
,
get_brand_color_tint()
,
get_brand_font()
Examples
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
[Package brandr version 0.1.0 Index]