Skip to contents

[Maturing]

get_brand_color_tint() generates a range of tints (color variations) for a specific brand color, from black (position 0) through the brand color (position 500) to white (position 1000).

Usage

get_brand_color_tint(position = 500, color = "primary")

Arguments

position

(Optional) A numeric vector indicating the position of the brand color in the range of tints. The range of positions is from 0 to 1000 (Default: 500).

color

(Optional) A character string indicating the name of a color present in the color section of the _brand.yml file (Default: "primary").

Value

A character vector with hexadecimal color codes.

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")

See also

Other utility functions: get_brand_color(), get_brand_color_mix(), get_brand_font()

Examples

seq(0, 1000, 250)
#> [1]    0  250  500  750 1000
#> [1]    0  250  500  750 1000 # Expected

get_brand_color_tint(seq(0, 1000, 250), color = "primary")
#> [1] "#000000" "#6D271E" "#DA4E3C" "#ECA69D" "#FFFFFF"
#> [1] "#000000" "#6D271E" "#DA4E3C" "#ECA69D" "#FFFFFF" # Expected