Title: | Comprehensive Collection of Color Palettes |
Version: | 1.6.0 |
Author: | See AUTHORS file. |
Maintainer: | Emil Hvitfeldt <emilhhvitfeldt@gmail.com> |
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. |
License: | GPL-3 |
URL: | https://github.com/EmilHvitfeldt/paletteer |
BugReports: | https://github.com/EmilHvitfeldt/paletteer/issues |
Depends: | R (≥ 2.10) |
Imports: | prismatic, rematch2, rlang, rstudioapi |
Suggests: | covr, ggplot2 (≥ 3.3.0), ggthemes (≥ 4.0.0), harrypotter (≥ 2.1.0), knitr, oompaBase, palr, pals, rmarkdown, scico, testthat (≥ 2.1.0), vdiffr, viridisLite |
Copyright: | See LICENSE.note file. |
Config/testthat/edition: | 3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.3.0 |
NeedsCompilation: | no |
Packaged: | 2024-01-21 02:33:27 UTC; emilhvitfeldt |
Repository: | CRAN |
Date/Publication: | 2024-01-21 18:00:02 UTC |
paletteer: 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.
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.
See Also
Useful links:
Report bugs at https://github.com/EmilHvitfeldt/paletteer/issues
Useful links:
Report bugs at https://github.com/EmilHvitfeldt/paletteer/issues
Binned scales to use for ggplot2
Description
These functions provide the option to use binned palettes along with the
ggplot2
package. It goes without saying that it requires ggplot2
to work.
Usage
scale_colour_paletteer_binned(palette, direction = 1, ...)
scale_color_paletteer_binned(palette, direction = 1, ...)
scale_fill_paletteer_binned(palette, direction = 1, ...)
Arguments
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
direction |
Either |
... |
Arguments to pass on to |
Details
Available package/palette combinations are available in the data.frame
palettes_c_names
.
Value
A ScaleContinuous
object that can be added to a ggplot
object
Examples
library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) +
geom_point() +
scale_colour_paletteer_binned("scico::tokyo")
Continuous scales to use for ggplot2
Description
These functions provide the option to use continuous palettes along with the
ggplot2
package. It goes without saying that it requires ggplot2
to work.
Usage
scale_colour_paletteer_c(palette, direction = 1, ...)
scale_color_paletteer_c(palette, direction = 1, ...)
scale_fill_paletteer_c(palette, direction = 1, ...)
Arguments
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
direction |
Either |
... |
Arguments to pass on to |
Details
Available package/palette combinations are available in the data.frame
palettes_c_names
.
Value
A ScaleContinuous
object that can be added to a ggplot
object
Examples
library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) +
geom_point() +
scale_colour_paletteer_c("scico::tokyo")
Wrappers around continuous palette functions by package
Description
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.
Usage
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)
Arguments
name |
Character, name of palette. |
n |
Integer, number of colors. |
Value
Vector of color values from specified palette.
Get continuous palette by package and name
Description
Available package/palette combinations are available in the data.frame
palettes_c_names
.
Usage
paletteer_c(palette, n, direction = 1)
Arguments
palette |
Name of palette as a string. Must be on the form packagename::palettename. |
n |
Number of colors desired. Must be supplied. |
direction |
Either |
Value
A vector of colors.
Examples
paletteer_c("scico::berlin", 100)
Get discrete palette by package and name
Description
Available package/palette combinations are available in the data.frame
palettes_d_names
.
Usage
paletteer_d(palette, n, direction = 1, type = c("discrete", "continuous"))
Arguments
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". |
Value
A vector of colors.
Examples
paletteer_d("nord::frost")
paletteer_d("wesanderson::Royal1", 3)
paletteer_d("Redmonder::dPBIPuOr", 14, type = "continuous")
Get dynamic palette by package and name
Description
Available package/palette combinations are available in the data.frame
palettes_dynamic_names
.
Usage
paletteer_dynamic(palette, n, direction = 1)
Arguments
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 |
Value
A vector of colors.
Examples
paletteer_dynamic("ggthemes_solarized::green", 8)
paletteer_dynamic("cartography::sand.pal", 20)
Names and version information for all packages included
Description
Names and version information for all packages included
Usage
paletteer_packages
Format
A data.frame with 3 variables:
- Names
character, name of package
- Github
character, name of Github repository
- github_ver
character, version number on Github
- CRAN
logical, is package available on CRAN
- CRAN_ver
character, version number on CRAN
Names of all continuous palettes
Description
A data.frame of the names and other characteristics of the continuous palettes included in this package.
Usage
palettes_c_names
Format
A data.frame of 319 observations with 3 variables:
- package
character, name of package
- palette
character, name of palette
- type
character, type of palette
Details
Contains palettes names from the following packages: ggthemes, grDevices, harrypotter, oompaBase, palr, pals, scico, viridis.
Complete list of fixed discrete palettes
Description
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.
Usage
palettes_d
Format
A list of 69 lists.
Details
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
.
Names of all fixed discrete palettes
Description
A data.frame of the names and other characteristics of the discrete palettes of fixed lengths included in this package.
Usage
palettes_d_names
Format
A data.frame of 2415 observations with 4 variables:
- package
character, name of package
- palette
character, name of palette
- length
integer, number of colors in palette
- type
character, type of palette
Details
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
.
Complete list of dynamic palettes
Description
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.
Usage
palettes_dynamic
Format
A list of 3 lists.
Details
Contains palettes from the following packages: cartography and ggthemes.
Full list of palette names can be found here palettes_dynamic_names
.
Names of all fixed discrete palettes
Description
A data.frame of the names and other characteristics of the dynamic palettes included in this package.
Usage
palettes_dynamic_names
Format
A data.frame of 25 observations with 4 variables:
- package
character, name of package
- palette
character, name of palette
- length
integer, maximal number of colors in palette
- type
character, type of palette
Details
Contains palettes from the following packages: cartography and ggthemes.
Full list of palette can be found here palettes_dynamic
.
Discrete scales to use for ggplot2
Description
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.
Usage
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, ...)
Arguments
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 |
Details
Available package/palette combinations are available in the data.frame
palettes_d_names
and
palettes_dynamic_names
.
Examples
library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
geom_point() +
scale_colour_paletteer_d("nord::frost")