New ggplot2 scales, in the style of scale_fill_viridis():
scale_fill_ltc(), scale_colour_ltc() and scale_color_ltc(). Each takes
a palette name, discrete = TRUE (the default) or FALSE for a continuous
scale, and direction = -1 to reverse the palette. Plots no longer need
scale_fill_manual(values = ltc(...)).
New ltc_pal() returns a palette function of n, for use with other scale
constructors. It interpolates when asked for more colours than the palette
holds, so a scale does not break on more groups than expected.
The all-palettes README figure is now a gallery of palette cards: one card
per palette, every colour an equal tile carrying its hex code, grouped by how
many colours the palette has. Drawn at twice the pixel density, and generated
by data-raw/gallery/make_palette_cards.R straight from the palette
definitions, so a new palette appears with no other edit.
ltc(), adjust_ltc(), custom_adjust_ltc() and desaturate_ltc() now
accept a palette name supplied as a variable (e.g.
pal <- "remains"; ltc(pal)), in addition to a quoted string and a bare name.
The name-resolution logic is shared and covered by testthat tests.
casa_natal, inspired by Casa Natal on the Plaza de la Merced,
the birthplace of Picasso.ltc_cvd() previews a palette under the three main types of
colour-vision deficiency (deuteranopia, protanopia, tritanopia).colorspace package dependency for color manipulationadjust_ltc() - Darken or lighten palette colorscustom_adjust_ltc() - Apply custom adjustments to individual colorsdesaturate_ltc() - Desaturate palette colorsNEWS.md file to track changes to the package