Skip to contents

Sequential colour palettes are used to encode numerical information that has a natural order (where data can be ordered from high to low, or vice versa). The use of a sequential palette typically indicates that the importance or significance of values varies in line with the natural order of the data. Values with higher luminance (lighter colours) are generally those that are less important, and values with lower luminance (darker colours) indicates greater importance.

Usage

pal_sequential(
  palette = c("blues", "dark_blues", "blue_grey", "blue_green_yellow"),
  alpha = 1,
  reverse = FALSE
)

Arguments

palette

Currently there are four sequential colour palettes available: "blues" (a 9-colour single-hue NHS Blue palette), "dark_blues" (a 9-colour single-hue SCW Dark Blue palette), "blue_grey" (a 9-colour multi-hue palette that uses SCW Dark Blue and NHS Pale Grey), and "blue_green_yellow" (a 9-colour multi-hue palette that is generated using NHS Blue, NHS Aqua Green, and NHS Warm Yellow).

alpha

Transparency level, a real number in (0, 1]. See alpha in rgb for details.

reverse

The default, FALSE, generates the colour palette as defined, while TRUE generates the colour palette in reverse order.

Examples

scales::show_col(pal_sequential(palette = "blues")(9))

scales::show_col(pal_sequential(palette = "dark_blues")(9))

scales::show_col(pal_sequential(palette = "blue_grey")(9))

scales::show_col(pal_sequential(palette = "blue_green_yellow")(9))

scales::show_col(pal_sequential(palette = "blue_green", alpha = 0.7)(9))

scales::show_col(pal_sequential(palette = "blue_green", reverse = TRUE)(9))