get_brand_color_tint: Get tints of brand colors

View source: R/get_brand.R

get_brand_color_tintR Documentation

Get tints of brand colors

Description

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

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(), get_brand_color_mix(), get_brand_font()

Examples

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

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

brandr documentation built on April 4, 2025, 5:30 a.m.