This function returns the colours that are used in the Strategy Unit theme as a named vector of RGB values in hexadecimal form.

su_theme_cols(
  ...,
  palette = c(NA, "main", "oranges", "charcoals", "slates", "reds", "blues")
)

Arguments

...

individual colours that you wish to get the values of

palette

a name of a palette to select the colours of

Value

a named vector of RGB colours in hexadecimal form

Details

If no arguments are passed to the function, then all of the colours are returned. If only specific colours are required, then the names of the colours that are required can be passed as strings to the function, and only those colours will be returned.

If a "pallete" is selected then no arguments should be passed to ...

Only one palete can be selected at a time.

Examples

# show all of the colours
su_theme_cols()
#>         orange       charcoal          slate           blue            red 
#>      "#f9bf07"      "#2c2825"      "#686f73"      "#5881c1"      "#ec6555" 
#>   light_orange light_charcoal    light_slate     light_blue      light_red 
#>      "#fcdf83"      "#9d928a"      "#b2b7b9"      "#abc0e0"      "#f5b2aa" 
#>    dark_orange  dark_charcoal     dark_slate      dark_blue       dark_red 
#>      "#7c5f03"      "#151412"      "#343739"      "#263f66"      "#901d10" 
# or, just show some colours
su_theme_cols("orange", "red", "grey")
#>    orange       red      <NA> 
#> "#f9bf07" "#ec6555"        NA 
# or, select a single palette
su_theme_cols(palette = "slates")
#> light_slate       slate  dark_slate 
#>   "#b2b7b9"   "#686f73"   "#343739"