princess_db {tidyterra}R Documentation

Princess palettes database

Description

A tibble including the color map of 15 gradient palettes.

Format

A tibble of 75 rows and 5 columns. with the following fields:

pal

Name of the palette.

r

Value of the red channel (RGB color mode).

g

Value of the green channel (RGB color mode).

b

Value of the blue channel (RGB color mode).

hex

Hex code of the color.

Source

https://leahsmyth.github.io/Princess-Colour-Schemes/index.html.

See Also

scale_fill_princess_c()

Other datasets: cross_blended_hypsometric_tints_db, grass_db, hypsometric_tints_db, volcano2

Examples


data("princess_db")

princess_db

# Select a palette
maori <- princess_db %>%
  filter(pal == "maori")

f <- system.file("extdata/volcano2.tif", package = "tidyterra")
r <- terra::rast(f)

library(ggplot2)

p <- ggplot() +
  geom_spatraster(data = r) +
  labs(fill = "elevation")

p +
  scale_fill_gradientn(colors = maori$hex)


[Package tidyterra version 0.6.1 Index]