Title: | Comprehensive Collection of Color Palettes |
---|---|
Description: | The choices of color palettes in R can be quite overwhelming with palettes spread over many packages with many different API's. This packages aims to collect all color palettes across the R ecosystem under the same package with a streamlined API. |
Authors: | See AUTHORS file. |
Maintainer: | Emil Hvitfeldt <[email protected]> |
License: | GPL-3 |
Version: | 1.6.0.9000 |
Built: | 2024-11-21 04:35:36 UTC |
Source: | https://github.com/emilhvitfeldt/paletteer |
These functions provide the option to use binned palettes along with the
ggplot2
package. It goes without saying that it requires ggplot2
to work.
scale_colour_paletteer_binned(palette, direction = 1, ...) scale_color_paletteer_binned(palette, direction = 1, ...) scale_fill_paletteer_binned(palette, direction = 1, ...)
scale_colour_paletteer_binned(palette, direction = 1, ...) scale_color_paletteer_binned(palette, direction = 1, ...) scale_fill_paletteer_binned(palette, direction = 1, ...)
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
direction |
Either |
... |
Arguments to pass on to |
Available package/palette combinations are available in the data.frame
palettes_c_names
.
A ScaleContinuous
object that can be added to a ggplot
object
library(ggplot2) ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_paletteer_binned("scico::tokyo")
library(ggplot2) ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_paletteer_binned("scico::tokyo")
These functions provide the option to use continuous palettes along with the
ggplot2
package. It goes without saying that it requires ggplot2
to work.
scale_colour_paletteer_c(palette, direction = 1, ...) scale_color_paletteer_c(palette, direction = 1, ...) scale_fill_paletteer_c(palette, direction = 1, ...)
scale_colour_paletteer_c(palette, direction = 1, ...) scale_color_paletteer_c(palette, direction = 1, ...) scale_fill_paletteer_c(palette, direction = 1, ...)
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
direction |
Either |
... |
Arguments to pass on to |
Available package/palette combinations are available in the data.frame
palettes_c_names
.
A ScaleContinuous
object that can be added to a ggplot
object
library(ggplot2) ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_paletteer_c("scico::tokyo")
library(ggplot2) ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_paletteer_c("scico::tokyo")
These functions provide a function wrapper for each package such that a palette can be generated using only the name of the desired palette and the length.
paletteer_c_ggthemes(name, n) paletteer_c_grDevices(name, n) paletteer_c_oompaBase(name, n) paletteer_c_palr(name, n) paletteer_c_pals(name, n) paletteer_c_scico(name, n) paletteer_c_viridis(name, n) paletteer_c_harrypotter(name, n)
paletteer_c_ggthemes(name, n) paletteer_c_grDevices(name, n) paletteer_c_oompaBase(name, n) paletteer_c_palr(name, n) paletteer_c_pals(name, n) paletteer_c_scico(name, n) paletteer_c_viridis(name, n) paletteer_c_harrypotter(name, n)
name |
Character, name of palette. |
n |
Integer, number of colors. |
Vector of color values from specified palette.
Available package/palette combinations are available in the data.frame
palettes_c_names
.
paletteer_c(palette, n, direction = 1)
paletteer_c(palette, n, direction = 1)
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
n |
Number of colors desired. Must be supplied. |
direction |
Either |
A vector of colors.
paletteer_c("scico::berlin", 100)
paletteer_c("scico::berlin", 100)
Available package/palette combinations are available in the data.frame
palettes_d_names
.
paletteer_d(palette, n, direction = 1, type = c("discrete", "continuous"))
paletteer_d(palette, n, direction = 1, type = c("discrete", "continuous"))
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
n |
Number of colors desired. If omitted, returns complete palette. |
direction |
Either |
type |
Either "discrete" or "continuous". Colors are interpolated if "continuous" is picked. Defaults to "discrete". |
A vector of colors.
paletteer_d("nord::frost") paletteer_d("wesanderson::Royal1", 3) paletteer_d("Redmonder::dPBIPuOr", 14, type = "continuous")
paletteer_d("nord::frost") paletteer_d("wesanderson::Royal1", 3) paletteer_d("Redmonder::dPBIPuOr", 14, type = "continuous")
Available package/palette combinations are available in the data.frame
palettes_dynamic_names
.
paletteer_dynamic(palette, n, direction = 1)
paletteer_dynamic(palette, n, direction = 1)
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
n |
Number of colors desired. If omitted, returns complete palette. |
direction |
Either |
A vector of colors.
paletteer_dynamic("ggthemes_solarized::green", 8) paletteer_dynamic("cartography::sand.pal", 20)
paletteer_dynamic("ggthemes_solarized::green", 8) paletteer_dynamic("cartography::sand.pal", 20)
Names and version information for all packages included
paletteer_packages
paletteer_packages
A data.frame with 3 variables:
character, name of package
character, name of Github repository
character, version number on Github
logical, is package available on CRAN
character, version number on CRAN
A data.frame of the names and other characteristics of the continuous palettes included in this package.
palettes_c_names
palettes_c_names
A data.frame of 319 observations with 3 variables:
character, name of package
character, name of palette
character, type of palette
Contains palettes names from the following packages: ggthemes, grDevices, harrypotter, oompaBase, palr, pals, scico, viridis.
A list of all the discrete palettes of fixed lengths included in this package. Structured as a list of lists with the first level being each package and the second level being the palettes available in that package.
palettes_d
palettes_d
A list of 69 lists.
Contains palettes from the following packages: ButterflyColors, DresdenColor, IslamicArt, LaCroixColoR, Manu, MapPalettes, MetBrewer, MexBrewer, MoMAColors, NatParksPalettes, NineteenEightyR, PNWColors, Polychrome, PrettyCols, RColorBrewer, RSkittleBrewer, Redmonder, awtools, basetheme, beyonce, calecopal, colRoz, colorBlindness, colorblindr, dichromat, dutchmasters, feathers, fishualize, futurevisions, ggpomological, ggprism, ggsci, ggthemes, ggthemr, ghibli, grDevices, impressionist.colors, jcolors, khroma, lisa, ltc, miscpalettes, musculusColors, nationalparkcolors, nbapalettes, nord, ochRe, palettesForR, palettetown, pals, peRReo, rcartocolor, rockthemes, rtist, severance, soilpalettes, suffrager, tayloRswift, tidyquant, trekcolors, tvthemes, unikn, vangogh, vapeplot, vapoRwave, waRhol, werpals, wesanderson, yarrr.
data.frame of palette names can be found here palettes_d_names
.
A data.frame of the names and other characteristics of the discrete palettes of fixed lengths included in this package.
palettes_d_names
palettes_d_names
A data.frame of 2415 observations with 4 variables:
character, name of package
character, name of palette
integer, number of colors in palette
character, type of palette
Contains palettes names from the following packages: ButterflyColors, DresdenColor, IslamicArt, LaCroixColoR, Manu, MapPalettes, MetBrewer, MexBrewer, MoMAColors, NatParksPalettes, NineteenEightyR, PNWColors, Polychrome, PrettyCols, RColorBrewer, RSkittleBrewer, Redmonder, awtools, basetheme, beyonce, calecopal, colRoz, colorBlindness, colorblindr, dichromat, dutchmasters, feathers, fishualize, futurevisions, ggpomological, ggprism, ggsci, ggthemes, ggthemr, ghibli, grDevices, impressionist.colors, jcolors, khroma, lisa, ltc, miscpalettes, musculusColors, nationalparkcolors, nbapalettes, nord, ochRe, palettesForR, palettetown, pals, peRReo, rcartocolor, rockthemes, rtist, severance, soilpalettes, suffrager, tayloRswift, tidyquant, trekcolors, tvthemes, unikn, vangogh, vapeplot, vapoRwave, waRhol, werpals, wesanderson, yarrr.
Full list of palette can be found here palettes_d
.
A list of all the dynamic palettes included in this package. Structured as a list of lists with the first level being each package and the second level being the palettes available in that package, and the third level being the palettes for various lengths.
palettes_dynamic
palettes_dynamic
A list of 3 lists.
Contains palettes from the following packages: cartography and ggthemes.
Full list of palette names can be found here palettes_dynamic_names
.
A data.frame of the names and other characteristics of the dynamic palettes included in this package.
palettes_dynamic_names
palettes_dynamic_names
A data.frame of 25 observations with 4 variables:
character, name of package
character, name of palette
integer, maximal number of colors in palette
character, type of palette
Contains palettes from the following packages: cartography and ggthemes.
Full list of palette can be found here palettes_dynamic
.
These functions provide the option to use the discrete and dynamic palettes
along with the ggplot2
package. It goes without saying that it requires
ggplot2
to work.
scale_colour_paletteer_d(palette, direction = 1, dynamic = FALSE, ...) scale_color_paletteer_d(palette, direction = 1, dynamic = FALSE, ...) scale_fill_paletteer_d(palette, direction = 1, dynamic = FALSE, ...)
scale_colour_paletteer_d(palette, direction = 1, dynamic = FALSE, ...) scale_color_paletteer_d(palette, direction = 1, dynamic = FALSE, ...) scale_fill_paletteer_d(palette, direction = 1, dynamic = FALSE, ...)
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
direction |
Either |
dynamic |
toggles between the discrete palettes and the dynamic palettes. Defaults to FALSE which indicates discrete palettes. |
... |
additional arguments to pass to discrete_scale |
Available package/palette combinations are available in the data.frame
palettes_d_names
and
palettes_dynamic_names
.
library(ggplot2) ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) + geom_point() + scale_colour_paletteer_d("nord::frost")
library(ggplot2) ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) + geom_point() + scale_colour_paletteer_d("nord::frost")