Title: | NHS R Theme |
---|---|
Description: | Provides theme's based on the [https://www.england.nhs.uk/nhsidentity/](NHS Identity). |
Authors: | Tom Jemmett [aut, cre] , NHS-R Community [cph], Silvia Canelon [ctb] , Adam Ivison [ctb], John MacKintosh [ctb], Chris Mainey [ctb] |
Maintainer: | Tom Jemmett <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-19 11:19:47 UTC |
Source: | https://github.com/nhs-r-community/NHSRtheme |
This function returns tints of the NHS identity colours
get_nhs_colour_tints(tints, ..., section = NULL)
get_nhs_colour_tints(tints, ..., section = NULL)
tints |
a vector of numbers between 0 and 1 for the percentage colour tint to use |
... |
optional names of the colours to return |
section |
optional, name of the colour sections to use |
named vector of hexadecimal strings of colours
get_nhs_colour_tints(seq(0.0,0.8,0.2)) get_nhs_colour_tints(seq(0.0,0.8,0.2), "Blue", "Red") get_nhs_colour_tints(seq(0.0,0.8,0.2), section = "blues")
get_nhs_colour_tints(seq(0.0,0.8,0.2)) get_nhs_colour_tints(seq(0.0,0.8,0.2), "Blue", "Red") get_nhs_colour_tints(seq(0.0,0.8,0.2), section = "blues")
This function gets the colours as defined by the NHS Identity
get_nhs_colours(..., section = NULL)
get_nhs_colours(..., section = NULL)
... |
optional names of the colours to return |
section |
optional, name of the colour sections to use |
named vector of hexadecimal strings of colours
get_nhs_colours() get_nhs_colours("Blue") get_nhs_colours("Blue", "Red") get_nhs_colours(section = "blues")
get_nhs_colours() get_nhs_colours("Blue") get_nhs_colours("Blue", "Red") get_nhs_colours(section = "blues")
Return function to interpolate an Nhs theme colour palette
get_nhs_palette(palette = "main", reverse = FALSE, ...)
get_nhs_palette(palette = "main", reverse = FALSE, ...)
palette |
Character name of section in Nhs theme |
reverse |
Boolean indicating whether the palette should be reversed |
... |
Additional arguments to pass to colorRampPalette() |
NHSRtheme
packageNHS Theme
#' See the README on https://github.com/tomjemmet/NHSRtheme/
Color scale constructor for NHS theme colours
scale_colour_nhs(palette = "main", discrete = TRUE, reverse = FALSE, ...)
scale_colour_nhs(palette = "main", discrete = TRUE, reverse = FALSE, ...)
palette |
Character name of palette in NHS theme |
discrete |
Boolean indicating whether colour aesthetic is discrete or not |
reverse |
Boolean indicating whether the palette should be reversed |
... |
Additional arguments passed to discrete_scale() or scale_colour_gradientn(), used respectively when discrete is TRUE or FALSE |
Fill scale constructor for NHS theme colours
scale_fill_nhs(palette = "main", discrete = TRUE, reverse = FALSE, ...)
scale_fill_nhs(palette = "main", discrete = TRUE, reverse = FALSE, ...)
palette |
Character name of palette in NHS theme |
discrete |
Boolean indicating whether colour aesthetic is discrete or not |
reverse |
Boolean indicating whether the palette should be reversed |
... |
Additional arguments passed to discrete_scale() or scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE |
This function shows the tints of a colour from the Nhs Theme
show_nhs_theme_colour_tints(tints, colour)
show_nhs_theme_colour_tints(tints, colour)
tints |
a vector of numbers between 0 and 1 that represents the percentage tints required |
colour |
the name of the colour to show tints of |
named vector of hexadecimal strings of colours
show_nhs_theme_colour_tints(seq(0,1,0.1), "Blue")
show_nhs_theme_colour_tints(seq(0,1,0.1), "Blue")
This function shows the available colours in the NHS theme, as defined by the NHS Identity
show_nhs_theme_colours()
show_nhs_theme_colours()
named vector of hexadecimal strings of colours
show_nhs_theme_colours()
show_nhs_theme_colours()
This adds a theme to your chart to follow the NHS Identity
theme_nhs()
theme_nhs()