paletteer
π¨π¨π¨ Collection of most color palettes in a single R package
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
-
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
-
βDOI references
-
βAcademic publication links
-
βCommitters with academic emails
-
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (16.6%) to scientific vocabulary
Keywords
color-palette
palettes
r
rstats
Keywords from Contributors
correlation
spatial-analysis
visualisation
robust
bayes-factors
latex
report
ggplot-extension
Last synced: 9 months ago
·
JSON representation
Repository
π¨π¨π¨ Collection of most color palettes in a single R package
Basic Info
- Host: GitHub
- Owner: EmilHvitfeldt
- License: other
- Language: R
- Default Branch: main
- Homepage: https://emilhvitfeldt.github.io/paletteer/
- Size: 17.3 MB
Statistics
- Stars: 999
- Watchers: 18
- Forks: 49
- Open Issues: 11
- Releases: 10
Topics
color-palette
palettes
r
rstats
Created almost 8 years ago
· Last pushed almost 2 years ago
Metadata Files
Readme
Changelog
Contributing
License
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
# paletteer
[](https://github.com/emilhvitfeldt/paletteer/actions)
[](https://cran.r-project.org/package=paletteer)
[](https://CRAN.R-project.org/package=paletteer)
[](https://app.codecov.io/gh/emilhvitfeldt/paletteer?branch=main)
[](https://lifecycle.r-lib.org/articles/stages.html)
The goal of **paletteer** is to be a comprehensive collection of color palettes in R using a common interface. Think of it as the "caret of palettes".
**Notice** This version is not backwards compatible with versions <= 0.2.1. Please refer to the end of the readme for breaking changes
## Installation
You can install the released version of **paletteer** from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("paletteer")
```
If you want the development version instead then install directly from GitHub:
```{r, eval=FALSE}
# install.packages("devtools")
devtools::install_github("EmilHvitfeldt/paletteer")
```
## Palettes
The palettes are divided into 2 groups; *discrete* and *continuous*. For discrete palette you have the choice between the *fixed width palettes* and *dynamic palettes*. Most common of the two are the fixed width palettes which have a set amount of colors which doesn't change when the number of colors requested vary like the following palettes:
```{r echo=FALSE}
library(paletteer)
pals::pal.bands(
paletteer_d("nord::frost"),
paletteer_d("dutchmasters::milkmaid"),
paletteer_d("LaCroixColoR::Lime"),
main = "Fixed width palettes",
labels = c("nord\n frost", "dutchmasters\n milkmaid", "LaCroixColoR\n Lime")
)
```
on the other hand we have the dynamic palettes where the colors of the palette depend on the number of colors you need like the `green.pal` palette from the `cartography` package:
```{r echo=FALSE}
pals::pal.bands(
paletteer_dynamic("cartography::green.pal", 2),
paletteer_dynamic("cartography::green.pal", 5),
paletteer_dynamic("cartography::green.pal", 8),
main = "Dynamic palettes",
labels = c("cartography\n green.pal\n n = 2",
"cartography\n green.pal\n n = 5",
"cartography\n green.pal\n n = 6")
)
```
Lastly we have the continuous palettes which provides as many colors as you need for a smooth transition of color:
```{r echo=FALSE}
library(paletteer)
pals::pal.bands(
paletteer_c("viridis::inferno", 256),
paletteer_c("grDevices::terrain.colors", 256),
paletteer_c("scico::berlin", 256),
main = "continuous palettes",
labels = c("viridis\n inferno", "grDevices\n terrain.colors", "scico\n berlin")
)
```
This package includes `r nrow(palettes_c_names) + nrow(palettes_d_names) + nrow(palettes_dynamic_names)` palettes from `r length(unique(c(palettes_c_names$package, palettes_d_names$package, palettes_dynamic_names$package))) - 2` different packages and information about these can be found in the following data.frames: `palettes_c_names`, `palettes_d_names` and `palettes_dynamic_names`. Additionally this [github repo](https://github.com/EmilHvitfeldt/r-color-palettes) showcases all the palettes included in the package and more.
## Examples
All the palettes can be accessed from the 3 functions `paletteer_c()`, `paletteer_d()` and `paletteer_dynamic()` using the by using the syntax packagename::palettename.
```{r}
paletteer_c("scico::berlin", n = 10)
paletteer_d("nord::frost")
paletteer_dynamic("cartography::green.pal", 5)
```
All of the functions now also support tab completion to easily access the hundreds of choices

## ggplot2 scales
Lastly the package also includes scales for `ggplot2` using the same standard interface
```{r}
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point() +
scale_color_paletteer_d("nord::aurora")
```
## Palette explorer
A [web application](https://r-graph-gallery.com/color-palette-finder) is available to quickly explore the available palettes.
[](https://r-graph-gallery.com/color-palette-finder)
## Breaking changes
In version <= 0.2.1 a palatte was selected by specifying a `package` and `palette` argument like so
```{r, eval=FALSE}
paletteer_c(package = "nord", palette = "frost")
```
After version 0.2.1 palettes are selected using the syntax `"packagename::palettename"` inside the palette functions.
```{r, eval=FALSE}
paletteer_c("nord::frost")
```
## Special thanks
- [Hadley Wickham](https://github.com/hadley) For helpful code improvements.
## Included packages
**paletteer** includes palettes from the following packages:
```{r, echo=FALSE}
p_df <- paletteer_packages
p_df$Github <- ifelse(!is.na(paletteer_packages$Github),
paste0("[", paletteer_packages$Github, " - ",
paletteer_packages$github_ver, "](https://github.com/",
paletteer_packages$Github, ")"),
"-")
p_df$CRAN <- ifelse(paletteer_packages$CRAN,
paste0("[", paletteer_packages$CRAN_ver, "](https://CRAN.R-project.org/package=", paletteer_packages$Name,
")"),
"-")
p_df$CRAN[p_df$Name == "grDevices"] <- p_df$CRAN_ver[p_df$Name == "grDevices"]
knitr::kable(p_df[c("Name", "Github", "CRAN")])
```
Owner
- Name: Emil Hvitfeldt
- Login: EmilHvitfeldt
- Kind: user
- Location: California
- Company: @posit-dev
- Website: https://www.emilhvitfeldt.com/
- Repositories: 27
- Profile: https://github.com/EmilHvitfeldt
All things @tidymodels
GitHub Events
Total
- Issues event: 3
- Watch event: 71
- Issue comment event: 6
- Fork event: 4
Last Year
- Issues event: 3
- Watch event: 71
- Issue comment event: 6
- Fork event: 4
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| EmilHvitfeldt | e****t@g****m | 225 |
| Indrajeet Patil | i****8@g****m | 3 |
| Yan Holtz | y****a@g****m | 2 |
| Teun van den Brand | t****d@g****m | 2 |
| Etienne Bacher | 5****r | 2 |
| Matthew Leonawicz | m****z@e****m | 2 |
| olivroy | 5****y | 1 |
| Matthew J. Oldach | m****6@g****m | 1 |
| DarΓo HereΓ±ΓΊ | m****a@g****m | 1 |
| Cesar Luis Aybar Camacho | a****4@g****m | 1 |
Committer Domains (Top 20 + Academic)
esource.com: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 111
- Total pull requests: 14
- Average time to close issues: 5 months
- Average time to close pull requests: 19 days
- Total issue authors: 37
- Total pull request authors: 8
- Average comments per issue: 0.95
- Average comments per pull request: 0.64
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 0
- Average time to close issues: about 1 month
- Average time to close pull requests: N/A
- Issue authors: 5
- Pull request authors: 0
- Average comments per issue: 0.4
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- EmilHvitfeldt (59)
- IndrajeetPatil (11)
- ghost (2)
- smach (2)
- davidhodge931 (2)
- verajosemanuel (2)
- fkohrt (1)
- modche (1)
- IdoBar (1)
- Nenuial (1)
- werkstattcodes (1)
- lopierra (1)
- leonawicz (1)
- Close-your-eyes (1)
- olivroy (1)
Pull Request Authors
- EmilHvitfeldt (7)
- holtzy (2)
- IndrajeetPatil (2)
- teunbrand (2)
- olivroy (2)
- kant (1)
- Ryo-N7 (1)
- etiennebacher (1)
Top Labels
Issue Labels
new palettes (44)
bug (6)
documentation (1)
enhancement (1)
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- cran 142,219 last-month
- Total docker downloads: 11,564
-
Total dependent packages: 18
(may contain duplicates) -
Total dependent repositories: 47
(may contain duplicates) - Total versions: 40
- Total maintainers: 1
proxy.golang.org: github.com/emilhvitfeldt/paletteer
- Documentation: https://pkg.go.dev/github.com/emilhvitfeldt/paletteer#section-documentation
- License: other
-
Latest release: v1.6.0
published over 2 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
10 months ago
proxy.golang.org: github.com/EmilHvitfeldt/paletteer
- Documentation: https://pkg.go.dev/github.com/EmilHvitfeldt/paletteer#section-documentation
- License: other
-
Latest release: v1.6.0
published over 2 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
10 months ago
cran.r-project.org: paletteer
Comprehensive Collection of Color Palettes
- Homepage: https://github.com/EmilHvitfeldt/paletteer
- Documentation: http://cran.r-project.org/web/packages/paletteer/paletteer.pdf
- License: GPL-3
-
Latest release: 1.6.0
published over 2 years ago
Rankings
Stargazers count: 0.4%
Forks count: 1.6%
Downloads: 3.3%
Dependent repos count: 3.8%
Dependent packages count: 4.0%
Average: 5.7%
Docker downloads count: 21.1%
Maintainers (1)
Last synced:
10 months ago
conda-forge.org: r-paletteer
- Homepage: https://github.com/EmilHvitfeldt/paletteer
- License: GPL-3.0-only
-
Latest release: 1.5.0
published over 3 years ago
Rankings
Stargazers count: 14.5%
Dependent packages count: 19.6%
Average: 20.1%
Dependent repos count: 20.2%
Forks count: 26.3%
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- prismatic * imports
- rematch2 * imports
- rlang * imports
- rstudioapi * imports
- covr * suggests
- gameofthrones >= 1.0.0 suggests
- ggplot2 >= 3.3.0 suggests
- ggthemes >= 4.0.0 suggests
- harrypotter >= 2.1.0 suggests
- knitr * suggests
- oompaBase * suggests
- palr * suggests
- pals * suggests
- rmarkdown * suggests
- scico * suggests
- testthat >= 2.1.0 suggests
- vdiffr * suggests
- viridisLite * suggests
.github/workflows/R-CMD-check-hard.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml
actions
- actions/checkout v3 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml
actions
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite