• Stars
    star
    1,264
  • Rank 35,606 (Top 0.8 %)
  • Language
    R
  • Created about 6 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Comprehensive list of color palettes available in R β€οΈπŸ§‘πŸ’›πŸ’šπŸ’™πŸ’œ

Comprehensive list of color palettes in r

The goal of this repository is to have a one stop destination for anyone looking for a color palette to use in r. If you would like to help/contribute please feel free post an issue, PR or send a email to [email protected].

Further down the page is all the palettes available in the R ecosystem ordered alphabetically by package name. A list of palettes ordered by type can be found here Type sorted palettes to shorten the length of this page.

Paletteer package

I have collected all the palettes displayed here in a single package using a unified framework. Developmental version can be found here.

You can install the released version of paletteer from CRAN with:

If you want the development version instead then install directly from GitHub:

Table of Contents

Blogposts and other resources

Here is a collection of material on the use and creation of color palettes in r.

Color manipulation packages

Generative packages

The purpose of this project is to showcase the palettes already available in R (packages). However sometimes you have to resort to make one yourself. When that is the case the following packages aides in creating.

When creating color palettes certain website have also provided valuable

Perception of color palettes

Selecting a color palette requires a number of different considerations. Within these considerations is

  • the palette retains its integrity when printed in black and white
  • people with colorblindness are able to understand it

In the following I have outlined a couple of those problems

Printing in black and white

While most of the palettes presented here contains a wide variety of colors. While that is compelling, you need to remember that your product might be printed in black and white one day, and you should pick a palette that allows for interpretation if that is the case.

First example is the rainbow palette from the grDevices package with its colorful display. However as we see here would it be horrible if used for black and white printing since different colors are mapped to the same shade of grey.

A related problem happens with the standard color palette used in ggplot2 since that color is picked to have constant chroma and luminance thus yielding the same shade of grey when desaturated. (This palette is no longer the default for continuous variables in ggplot2 after version 3.0.0)

One of the continuous palette that satisfy this criteria is the well known viridis palettes.

To test if the palette you want to use will be distorted when in black and white, use the colorspace::desaturate() to desaturate it.

Color blindness

Another thing you have to take into consideration when picking a palette is how it would be viewed by a person who is color blind. To visualize the effect of color blindness on our palettes we will turn to two packages. The dichromat package can simulate color blindness on individual color and then also entire palettes like so in this rainbow palette:

Another package that can provide helpful is the amazing colorblindr package that is able to simulate color blindness to ggplot objects them self.

Honorable mentions

Due to the somehow vague notion of β€œcolor palette” have I decided to exclude certain kinds of packages from the main gallery. Generative package have been discussed earlier.

cpt-city

The amazing cpt-city is a wonderful project of creating an archive of color palettes to be used in cartography, technical illustration and design. Due to the immense size (7140) I have decided to refer to it instead of re-illustration them in this repository. If any of the palettes found here are for your liking they can be accessed in R using the following package:

# CRAN version
install.packages("cptcity")

sport colors

Many of the palettes in sports related palettes have a very limited number of colors (often only 2 colors). This leads to quite low usability outside of the special area of sports analytic.

  • colorr Color palettes for EPL, MLB, NBA, NHL, and NFL teams.

  • beanumber/teamcolors An R package providing color palettes for pro sports teams.

Canva palettes

The ggthemes package include the 150 four-color palettes from the canva.com. Due to the size and limited number of colors in the palettes these palettes will be featured on their own page and only once.

Palettes sorted by Package (alphabetically)

# Developmental version
devtools::install_github("awhstin/awtools")

# Developmental version
devtools::install_github("riatelab/cartography")
# CRAN version
install.packages("cartography")

# CRAN version
install.packages("dichromat")

# Developmental version
devtools::install_github("EdwinTh/dutchmasters")

# Developmental version
devtools::install_github("road2stat/ggsci")
# CRAN version
install.packages("ggsci")

# Developmental version
devtools::install_github("gadenbuie/ggpomological")

# Developmental version
devtools::install_github("jrnold/ggthemes")
# CRAN version
install.packages("ggthemes")

# Developmental version
devtools::install_github("ewenme/ghibli")
# CRAN version
install.packages("ghibli")

# CRAN version
install.packages("grDevices")

the jcolors continuous palettes are currently not available in the paletteer package.

# Developmental version
devtools::install_github("jaredhuling/jcolors")
# CRAN version
install.packages("jcolors")

# Developmental version
devtools::install_github("johannesbjork/LaCroixColoR")

# Developmental version
devtools::install_github("m-clark/NineteenEightyR")

# Developmental version
devtools::install_github("jkaupp/nord")
# CRAN version
install.packages("nord")

# Developmental version
devtools::install_github("ropenscilabs/ochRe")
# CRAN version
install.packages("ochRe")

# CRAN version
install.packages("oompaBase")

# Developmental version
devtools::install_github("timcdlucas/palettetown")
# CRAN version
install.packages("palettetown")

# Developmental version
devtools::install_github("AustralianAntarcticDivision/palr")
# CRAN version
install.packages("palr")

# Developmental version
devtools::install_github("kwstat/pals")
# CRAN version
install.packages("pals")

# Developmental version
devtools::install_github("kwstat/pals")
# CRAN version
install.packages("pals")

# CRAN version
install.packages("Polychrome")

# Developmental version
devtools::install_github("EmilHvitfeldt/quickpalette")

# Developmental version
devtools::install_github("Nowosad/rcartocolor")
# CRAN version
install.packages("rcartocolor")

# CRAN version
install.packages("RColorBrewer")

# CRAN version
install.packages("Redmonder")

# Developmental version
devtools::install_github("alyssafrazee/RSkittleBrewer")

# Developmental version
devtools::install_github("thomasp85/scico")
# CRAN version
install.packages("scico")

# Developmental version
devtools::install_github("sjmgarnier/viridis")
# CRAN version
install.packages("viridis")

# Developmental version
devtools::install_github("karthik/wesanderson")
# CRAN version
install.packages("wesanderson")

# Developmental version
devtools::install_github("ndphillips/yarrr")
# CRAN version
install.packages("yarrr")

More Repositories

1

paletteer

🎨🎨🎨 Collection of most color palettes in a single R package
R
779
star
2

ggpage

Creates Page Layout Visualizations in R πŸ“„πŸ“„πŸ“„
R
326
star
3

smltar

Manuscript of the book "Supervised Machine Learning for Text Analysis in R" by Emil Hvitfeldt and Julia Silge
TeX
239
star
4

RStudioConf2020Slides

Links to slides for rstudio::conf 2020
179
star
5

ISLR-tidymodels-labs

R
149
star
6

R-text-data

List of textual data sources to be used for text mining in R
139
star
7

prismatic

color manipulation R package Simply and Tidy
R
127
star
8

textdata

Download, parse, store, and load text datasets instead of storing it in packages
R
69
star
9

useR2020-text-modeling-tutorial

CSS
56
star
10

quarto-roughnotation

An extension that uses the roughnotation javascript library to add animated annotations to revealjs documents.
JavaScript
55
star
11

quarto-revealjs-codewindow

quarto Revealjs pluging for styled codechunks
JavaScript
53
star
12

friends

The Entire Transcript from Friends in Tidy Format
R
50
star
13

feature-engineering-az

Source for book "Feature Engineering A-Z"
HTML
48
star
14

quarto-nes-theme

A Quarto reveal.js theme based on NES.css
SCSS
42
star
15

gganonymize

Anonymize the labels and text in a ggplot2
R
42
star
16

quarto-revealjs-letterbox

A Quarto reveal.js theme based on xaringan letterbox
HTML
35
star
17

quarto-iframe-examples

JavaScript
32
star
18

quickpalette

πŸƒβ€β™€οΈπŸŽ¨ R package for quick extraction of color palettes from text and images
R
25
star
19

ggshapes

Adding various geometrical shapes to ggplot2
R
25
star
20

emoji

Data About Emojis
R
24
star
21

bookdown-github-actions-netlify

Example of using Github Actions to deploy bookdown on Netlify
R
21
star
22

quarto-designmode

Quarto Extension to enable DesignMode
JavaScript
21
star
23

talk-nyr-slidecraft

HTML
21
star
24

unitscales

Adding additional ggplot2 scales that adds units
R
20
star
25

xaringancolor

Uniform Colors in Xaringan Presentations
R
17
star
26

xaringan-gallery

xaringan gallery, a growing collection of examples and custom themes
HTML
17
star
27

walmartAPI

Walmart Open API Wrapper
R
17
star
28

quarto-revealjs-earth

Watercolor earth Quarto reveal.js theme
SCSS
17
star
29

talk-quarto-theming-positconf

JavaScript
16
star
30

horus

Visual tools to help machine learning model selection
R
14
star
31

elevators

Data Package Containing Information About Elevators in NYC
R
13
star
32

quarto-revealjs-cinco-de-mayo

Cinco de Mayo Quarto reveal.js theme
JavaScript
13
star
33

quarto-snow

Quarto Extension to add snow
JavaScript
12
star
34

scotus

Collection of Supreme Court of the United States' Opinions.
R
12
star
35

quarto-revealjs-highlightword

quarto Revealjs pluging for styled codechunks
JavaScript
11
star
36

quarto-revealjs-seasons

quarto revealjs seasons theme template
JavaScript
10
star
37

emilhvitfeldt

10
star
38

hcandersenr

An R Package for H.C. Andersens fairy tales
R
9
star
39

wordsalad

Provide Tools to Extract and Analyze Word Vectors
R
8
star
40

ferriswheels

Harmless data set about ferris wheels
R
8
star
41

workshop-useR2022-tidymodels

R
8
star
42

advent-of-steps

Adventofsteps slides
HTML
7
star
43

talk-useR2022-textrecipes

HTML
7
star
44

tidygutenbergr

cleaned gutenbergr text
R
7
star
45

quarto-revealjs-inverse

quarto revealjs inverse theme template
SCSS
7
star
46

tilemapr

R functions for square and hextile maps
R
7
star
47

palette2vec

Technique to Embed Color Palettes to Multidimensional Space
R
6
star
48

fontscales

Use Iconographic Fonts in 'ggplot2'
R
6
star
49

offensiveR

R package that checks for offensive words in texts and documents
R
5
star
50

talk-rstudioconf2022-tidyclust

JavaScript
5
star
51

genderify

HTML
5
star
52

pptxtemplates

Provide themed powerpoint presentation templates to rmarkdown
R
5
star
53

index-challenge

R
5
star
54

emiladdins

Moar Addins for RStudio
R
5
star
55

rstats-adventofcode

R
5
star
56

fastTextR

An Interface to the 'fastText' Library
C++
4
star
57

talk-purrr-ocrug-2023

HTML
4
star
58

extrasteps

More Steps for the 'recipes' Package
R
4
star
59

aocfuns

Advent Of Code helper functions
R
4
star
60

ggrandom

Introduce Absolute Chaos to 'ggplot2'
R
4
star
61

dplyr-slides

JavaScript
4
star
62

working-with-docker

🐳 Worked minimal examples of workflows with Docker and R
Dockerfile
4
star
63

percentify

Splitting a dataset according to percentile ranges to be used with tidy verbs
R
4
star
64

github-issue-table

HTML
3
star
65

quarto-syntax-theme-editor

Low-tech quarto syntax highlighting theme editor
R
3
star
66

tidytuesday

#TidyTuesday Gallery
3
star
67

miscpalettes

R package with miscellaneous color palettes
R
3
star
68

talk-positconf2023-fancy-slides

HTML
3
star
69

roundabouts

R package containing roundabouts database
R
3
star
70

tidymodels-pipelines

JavaScript
3
star
71

textmodels4pharma

SCSS
3
star
72

refactoring-r

Refactoring in R
R
3
star
73

AU-2021spring-627

HTML
3
star
74

workshop-ocrug-hackathon-nlp

HTML
3
star
75

quarto-revealjs-template

Personal Quarto Revealjs Template
SCSS
3
star
76

AU-2021fall-627

HTML
3
star
77

talk-harvard-tidymodels

CSS
3
star
78

emilverse

Easily Install and Load Select Packages
R
2
star
79

Tree-GenViz

R
2
star
80

quarto-revealjs-merry

JavaScript
2
star
81

workshops

2
star
82

talks

My collection of talks
HTML
2
star
83

rstudioconf-agenda

HTML
2
star
84

talk-positconf2023-101-slides

HTML
2
star
85

emilfun

Personal R Package
R
2
star
86

recap

R
2
star
87

ggshuffle

Tool to determine if the plotting order impacts the resulting ggplot2
R
2
star
88

talk-slc-slidecraft

JavaScript
2
star
89

talk-AstraZeneca-recipes

HTML
2
star
90

courses

2
star
91

color-resources

A curated list of resources related to the use of colors
2
star
92

quarto-revealjs-yule

JavaScript
2
star
93

workshop-quarto-websites

HTML
2
star
94

ggtetris

Create Tetris Chart Visualizations in R
R
1
star
95

animals

Dataset with Descriptions of Animals
R
1
star
96

Polygon-splitting-genViz

R
1
star
97

githublink

What the Package Does (One Line, Title Case)
R
1
star
98

palmtrees

Data About All Species of Palm Trees
R
1
star
99

foo

1
star
100

virtual-art-gallery-backup

HTML
1
star