Skip to contents

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

Usage

ncl_theme_cols(
  ...,
  palette = c(NA, "ics", "icb", "icb_darkblue", "icb_brightblue", "icb_aquablue",
    "icb_lightblue", "icb_nhsblue", "icb_darkgrey", "icb_midgrey", "ics_purple",
    "ics_pink", "ics_limegreen", "ics_brightgreen", "ics_teal")
)

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 "palette" is selected then no arguments should be passed to ...

Only one palette can be selected at a time.

Examples

# show all of the colours
ncl_theme_cols()
#>    icb_darkblue_100     icb_darkblue_80     icb_darkblue_60     icb_darkblue_40 
#>           "#003087"           "#33599f"           "#6683b7"           "#99accf" 
#>     icb_darkblue_20  icb_brightblue_100   icb_brightblue_80   icb_brightblue_60 
#>           "#ccd6e7"           "#0072CE"           "#338ed8"           "#66aae2" 
#>   icb_brightblue_40   icb_brightblue_20    icb_aquablue_100     icb_aquablue_80 
#>           "#99c7eb"           "#cce3f5"           "#00A9CE"           "#33bad8" 
#>     icb_aquablue_60     icb_aquablue_40     icb_aquablue_20   icb_lightblue_100 
#>           "#66cbe2"           "#99ddeb"           "#cceef5"           "#41B6E6" 
#>    icb_lightblue_80    icb_lightblue_60    icb_lightblue_40    icb_lightblue_20 
#>           "#67c5eb"           "#8dd3f0"           "#b3e2f5"           "#d9f0fa" 
#>     icb_nhsblue_100      icb_nhsblue_80      icb_nhsblue_60      icb_nhsblue_40 
#>           "#005EB8"           "#337ec6"           "#669ed4"           "#99bfe3" 
#>      icb_nhsblue_20    icb_darkgrey_100     icb_darkgrey_80     icb_darkgrey_60 
#>           "#ccdff1"           "#425563"           "#687782"           "#8e99a1" 
#>     icb_darkgrey_40     icb_darkgrey_20     icb_midgrey_100      icb_midgrey_80 
#>           "#b3bbc1"           "#d9dde0"           "#768692"           "#919ea8" 
#>      icb_midgrey_60      icb_midgrey_40      icb_midgrey_20     ics_black80_100 
#>           "#919ea8"           "#c8cfd3"           "#e4e7e9"           "#333333" 
#>      ics_purple_100       ics_purple_80       ics_purple_60       ics_purple_40 
#>           "#6059A3"           "#807ab5"           "#a09bc8"           "#bfbdda" 
#>       ics_purple_20        ics_pink_100         ics_pink_80         ics_pink_60 
#>           "#dfdeed"           "#CA589C"           "#d579b0"           "#df9bc4" 
#>         ics_pink_40         ics_pink_20   ics_limegreen_100    ics_limegreen_80 
#>           "#eabcd7"           "#f4deeb"           "#C0CA2E"           "#cdd558" 
#>    ics_limegreen_60    ics_limegreen_40    ics_limegreen_20 ics_brightgreen_100 
#>           "#d9df82"           "#e6eaab"           "#f2f4d5"           "#7FBE5E" 
#>  ics_brightgreen_80  ics_brightgreen_60  ics_brightgreen_40  ics_brightgreen_20 
#>           "#99cb7e"           "#b2d89e"           "#cce5bf"           "#e5f2df" 
#>        ics_teal_100         ics_teal_80         ics_teal_60         ics_teal_40 
#>           "#1B9B9D"           "#49afb1"           "#76c3c4"           "#a4d7d8" 
#>         ics_teal_20 
#>           "#d1ebeb" 
# or, just show some colours
ncl_theme_cols("ics", "icb", "nhsblue")
#> <NA> <NA> <NA> 
#>   NA   NA   NA 
# or, select a single palette
ncl_theme_cols(palette = "icb_nhsblue")
#> icb_nhsblue_100  icb_nhsblue_80  icb_nhsblue_60  icb_nhsblue_40  icb_nhsblue_20 
#>       "#005EB8"       "#337ec6"       "#669ed4"       "#99bfe3"       "#ccdff1"