Skip to contents

Get shade of colours

Usage

shade_colour(hex, p)

shade_colours_(hex, p)

shade_colours(hex, p, label = FALSE)

Arguments

hex

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

p

Range from 0 to 1 for proportion to shade 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 shaded to the desired proportion.

Examples

shade_colour(acdc_green, p = 0.2)
#> [1] "#2A7234"
shade_colours(acdc_palettes$acdc_secondary, p = 0.4)
#> [[1]]
#> [1] "#402E16"
#> 
#> [[2]]
#> [1] "#865619"
#> 
#> [[3]]
#> [1] "#763722"
#> 
#> [[4]]
#> [1] "#481A1B"
#> 
#> [[5]]
#> [1] "#2D321D"
#>