Skip to contents

Get tint of colours

Usage

tint_colour(hex, p)

tint_colours_(hex, p)

tint_colours(hex, p, label = FALSE)

Arguments

hex

A character value or vector of character of values for hex code of colour/s to tint.

p

A numeric value or vector of numeric values for proportion/s (range from 0 to 1) to tint the colour/s with.

label

Logical. Should the output/s be labelled? Default is FALSE.

Value

A character value or vector of character values of hex code/s tinted to the desired proportion.

Examples

tint_colour(acdc_green, p = 0.2)
#> [1] "#5CA567"
tint_colours(acdc_palettes$acdc_secondary, p = 0.4)
#> [[1]]
#> [1] "#A6937B"
#> 
#> [[2]]
#> [1] "#ECBB7F"
#> 
#> [[3]]
#> [1] "#DB9C88"
#> 
#> [[4]]
#> [1] "#AE8081"
#> 
#> [[5]]
#> [1] "#939882"
#>