govuk_colours | R Documentation |
Access the GOV.UK design system colour palette
govuk_colours govuk_palette(pal = "categorical")
pal |
One of |
An object of class character
of length 34.
The GOV.UK design system includes a colour palette, these can be accessed
via the govuk_colours
vector, it includes both Sass variable colour names
(e.g. govuk-text-colour
) as well as the named colour palette.
The GOV.UK colour scheme was not designed with data visualisation in mind.
The govuk_palette
function provides an opinionated selection of GOV.UK
colours for use in charts (e.g. via ggplot2::scale_fill_manual()
).
The categorical
palette (the default) provides an opinonated set of six
GOV.UK colours for use in categorical/qualitative palettes.
The blues
palette orders the GOV.UK colour palettes blues from dark to
light and can be used for sequential colour palettes. Alternatively you can
supply a name from the govuk_colours
vector to generate the end-points for
a sequential palette using that colour (where the lightest colour is roughly
a third lighter than the input colour).
There are also four opinionated palettes for use in a divergent scale, these all use an off-white (the mid-colour between GOV.UK light grey and white)
blrd
which use GOV.UK blue and GOV.UK red as its end-points
blrd_dark
which uses GOV.UK dark blue as its blue end-point and a darker
red of the same hue as GOV.UK red as its red end-point
blyl
which uses GOV.UK blue and GOV.UK yellow as its end-points
putq
which uses GOV.UK purple and GOV.UK turquoise as its end-points
The categorical and divergent palettes have been checked for general support for users with colour blindness.
A set of hexadecimal colours
govuk_colours
: GOV.UK colour palette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.