| Type: | Package |
| Title: | Scientific Journal and Sci-Fi Themed Color Palettes for'ggplot2' |
| Version: | 4.2.0 |
| Maintainer: | Nan Xiao <me@nanx.me> |
| Description: | A collection of 'ggplot2' color palettes inspired by plots in scientific journals, data visualization libraries, science fiction movies, and TV shows. |
| License: | GPL (≥ 3) |
| URL: | https://nanx.me/ggsci/,https://github.com/nanxstats/ggsci |
| BugReports: | https://github.com/nanxstats/ggsci/issues |
| Depends: | R (≥ 3.5.0) |
| Imports: | ggplot2 (≥ 2.0.0), grDevices, rlang, scales |
| Suggests: | gridExtra, knitr, ragg, rmarkdown |
| VignetteBuilder: | knitr |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | no |
| Packaged: | 2025-12-17 04:59:09 UTC; nanx |
| Author: | Nan Xiao |
| Repository: | CRAN |
| Date/Publication: | 2025-12-17 08:10:02 UTC |
ggsci: Scientific Journal and Sci-Fi Themed Color Palettes for 'ggplot2'
Description

A collection of 'ggplot2' color palettes inspired by plots in scientific journals, data visualization libraries, science fiction movies, and TV shows.
Author(s)
Maintainer: Nan Xiaome@nanx.me (ORCID) [copyright holder]
Other contributors:
Joshua Cookjoshuacook0023@gmail.com [contributor]
Clara Jégoussecat3@hi.is [contributor]
Hui Chenhuichen@zju.edu.cn [contributor]
Miaozhu Limiaozhu.li@duke.edu [contributor]
iTerm2-Color-Schemes contributors (iTerm2-Color-Schemes project) [contributor, copyright holder]
Winston Chang (staticimports.R) [contributor, copyright holder]
See Also
Useful links:
Report bugs athttps://github.com/nanxstats/ggsci/issues
Example plots for discrete color palettes
Description
Utility functions that return simple ggplot2 examples todemonstrate discrete color/fill scales.
Usage
example_scatterplot()example_barplot()Details
example_scatterplot()creates a scatter plot of large diamonds(carat >= 2.2), mappingtableto the x‑axis,priceto the y‑axis,andcutto color.example_barplot()creates a side‑by‑side bar chart of diamond countsbycolor, grouped bycutvia fill.
Value
Aggplot object.
Examples
example_scatterplot()example_barplot()iTerm color palette names
Description
iTerm color palette names
Usage
iterm_palettes()Value
Character vector of palette names.
Examples
iterm_palettes()AAAS journal color palettes
Description
Color palettes inspired by plots in journals published byAmerican Association for the Advancement of Science (AAAS),such asScience andScience Translational Medicine.
Usage
pal_aaas(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_aaas("default")(10))show_col(pal_aaas("default", alpha = 0.6)(10))Atlassian Design System palette
Description
The Atlassian Design System categorical data visualization palette.
Usage
pal_atlassian(palette = c("categorical8"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
Atlassian (2025). "Atlassian Design System categorical chart colors."https://atlassian.design/foundations/color-new/data-visualization-color
Examples
library("scales")show_col(pal_atlassian("categorical8")(8))show_col(pal_atlassian("categorical8", alpha = 0.6)(8))BMJ color palettes
Description
Color palette from the BMJ living style guide.
Usage
pal_bmj(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Hui Chen |huichen@zju.edu.cn
References
https://technology.bmj.com/living-style-guide/colour.html
Examples
library("scales")show_col(pal_bmj("default")(9))show_col(pal_bmj("default", alpha = 0.6)(9))Bootstrap 5 color palettes
Description
Bootstrap 5 color palettes.
Usage
pal_bs5( palette = c("blue", "indigo", "purple", "pink", "red", "orange", "yellow", "green", "teal", "cyan", "gray"), n = 10, alpha = 1, reverse = FALSE)Arguments
palette | Palette type. There are 11 available options:
|
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_bs5("indigo")(10))show_col(pal_bs5("indigo", n = 30, alpha = 0.6, reverse = TRUE)(30))COSMIC color palettes
Description
Color palettes inspired by the colors used in projects from theCatalogue Of Somatic Mutations in Cancers (COSMIC).
Usage
pal_cosmic( palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"), alpha = 1)Arguments
palette | Palette type. Currently there are three available options:
The |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Joshua H. Cook |joshuacook0023@gmail.com |@jhrcook
Examples
library("scales")show_col(pal_cosmic("hallmarks_light")(10))show_col(pal_cosmic("hallmarks_light", alpha = 0.6)(10))show_col(pal_cosmic("hallmarks_dark")(10))show_col(pal_cosmic("hallmarks_dark", alpha = 0.6)(10))show_col(pal_cosmic("signature_substitutions")(6))show_col(pal_cosmic("signature_substitutions", alpha = 0.6)(6))D3.js color palettes
Description
Color palettes based on the colors used by D3.js.
Usage
pal_d3( palette = c("category10", "category20", "category20b", "category20c"), alpha = 1)Arguments
palette | Palette type. There are four available options:
|
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md
Examples
library("scales")show_col(pal_d3("category10")(10))show_col(pal_d3("category20")(20))show_col(pal_d3("category20b")(20))show_col(pal_d3("category20c")(20))Flat UI color palettes
Description
Color palettes inspired by the Flat UI colors.
Usage
pal_flatui(palette = c("default", "flattastic", "aussie"), alpha = 1)Arguments
palette | Palette type. Currently there are three available options:
|
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Clara Jégousse |cat3@hi.is
Examples
library("scales")show_col(pal_flatui("default")(10))show_col(pal_flatui("flattastic")(12))show_col(pal_flatui("aussie")(10))show_col(pal_flatui("aussie", alpha = 0.6)(10))Frontiers journal color palettes
Description
Color palettes inspired by the colors used inFrontiers journals.
Usage
pal_frontiers(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Clara Jégousse |cat3@hi.is
Examples
library("scales")show_col(pal_frontiers("default")(7))show_col(pal_frontiers("default", alpha = 0.6)(7))Futurama color palettes
Description
Color palettes inspired by the colors used inFuturama.
Usage
pal_futurama(palette = c("planetexpress"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_futurama("planetexpress")(12))show_col(pal_futurama("planetexpress", alpha = 0.6)(12))The GSEA GenePattern color palettes
Description
Color palette inspired by the colors used in theheatmaps plotted by GSEA GenePattern.
Usage
pal_gsea(palette = c("default"), n = 12, alpha = 1, reverse = FALSE)Arguments
palette | Palette type.Currently there is one available option: |
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_gsea("default")(12))show_col(pal_gsea("default", n = 30, alpha = 0.6, reverse = TRUE)(30))Integrative Genomics Viewer (IGV) color palettes
Description
Color palettes based on the colors used byIntegrative Genomics Viewer (IGV).
Usage
pal_igv(palette = c("default", "alternating"), alpha = 1)Arguments
palette | Palette type.There are two available options:
|
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
James T. Robinson, Helga Thorvaldsdóttir, Wendy Winckler,Mitchell Guttman, Eric S. Lander, Gad Getz, Jill P. Mesirov.Integrative Genomics Viewer.Nature Biotechnology 29, 24–26 (2011).
Examples
library("scales")show_col(pal_igv("default")(51))show_col(pal_igv("alternating")(2))iTerm color palettes
Description
ANSI terminal color palettes sourced from the iterm2-color-schemes project.Each theme provides normal and bright variants.
Usage
pal_iterm( palette = iterm_palettes(), variant = c("normal", "bright"), alpha = 1)Arguments
palette | Palette name. See |
variant | Variant of the palette. One of |
alpha | Transparency level, a real number in (0, 1].See |
Details
Preview all available iTerm color palettes in ggsci:https://nanx.me/ggsci-iterm/.
References
https://github.com/mbadolato/iTerm2-Color-Schemes
Examples
library("scales")show_col(pal_iterm("Rose Pine")(6))show_col(pal_iterm("Rose Pine", variant = "bright", alpha = 0.7)(6))Journal of the American Medical Association color palettes
Description
Color palette inspired by plots inThe Journal of the American Medical Association.
Usage
pal_jama(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_jama("default")(7))show_col(pal_jama("default", alpha = 0.6)(7))Journal of Clinical Oncology color palettes
Description
Color palette inspired by plots inJournal of Clinical Oncology.
Usage
pal_jco(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_jco("default")(10))show_col(pal_jco("default", alpha = 0.6)(10))Lancet journal color palettes
Description
Color palettes inspired by plots in Lancet journals,such asLancet Oncology.
Usage
pal_lancet(palette = c("lanonc"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_lancet("lanonc")(9))show_col(pal_lancet("lanonc", alpha = 0.6)(9))LocusZoom color palette
Description
Color palettes based on the colors used by LocusZoom.
Usage
pal_locuszoom(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
Pruim, Randall J., et al. (2010). LocusZoom: regional visualization ofgenome-wide association scan results.Bioinformatics,26(18), 2336–2337.
Examples
library("scales")show_col(pal_locuszoom("default")(7))show_col(pal_locuszoom("default", alpha = 0.6)(7))Material Design color palettes
Description
Material Design 2 color palettes.
Usage
pal_material( palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"), n = 10, alpha = 1, reverse = FALSE)Arguments
palette | Palette type. There are 19 available options:
|
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_material("indigo")(10))show_col(pal_material("indigo", n = 30, alpha = 0.6, reverse = TRUE)(30))NEJM color palettes
Description
Color palette inspired by plots inThe New England Journal of Medicine.
Usage
pal_nejm(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_nejm("default")(8))show_col(pal_nejm("default", alpha = 0.6)(8))NPG journal color palettes
Description
Color palettes inspired by plots in journals published byNature Publishing Group, such asNature Reviews Cancer.
Usage
pal_npg(palette = c("nrc"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_npg("nrc")(10))show_col(pal_npg("nrc", alpha = 0.6)(10))Observable 10 color palette
Description
The Observable 10 palette.
Usage
pal_observable(palette = c("observable10"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
Pettiross J (2023). "Crafting data colors and staying on brand."Observable blog.https://observablehq.com/blog/crafting-data-colors
Examples
library("scales")show_col(pal_observable("observable10")(10))show_col(pal_observable("observable10", alpha = 0.6)(10))Primer design system palette
Description
The Primer design system data visualization palette.
Usage
pal_primer(palette = c("mark17"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
GitHub (2025). "Primer data visualization colors."https://primer.style/product/ui-patterns/data-visualization/
Examples
library("scales")show_col(pal_primer("mark17")(17))show_col(pal_primer("mark17", alpha = 0.6)(17))Rick and Morty color palettes
Description
Color palettes inspired by the colors used inRick and Morty.
Usage
pal_rickandmorty(palette = c("schwifty"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_rickandmorty("schwifty")(12))show_col(pal_rickandmorty("schwifty", alpha = 0.6)(12))The Simpsons color palettes
Description
Color palettes inspired by the colors used inThe Simpsons.
Usage
pal_simpsons(palette = c("springfield"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_simpsons("springfield")(16))show_col(pal_simpsons("springfield", alpha = 0.6)(16))Star Trek color palettes
Description
Color palettes inspired by the colors used inStar Trek.
Usage
pal_startrek(palette = c("uniform"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_startrek("uniform")(7))show_col(pal_startrek("uniform", alpha = 0.6)(7))Tron Legacy color palettes
Description
Color palettes inspired by the colors used inTron Legacy.
Usage
pal_tron(palette = c("legacy"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_tron("legacy")(7))show_col(pal_tron("legacy", alpha = 0.6)(7))Tailwind CSS color palettes
Description
Tailwind CSS color palettes.
Usage
pal_tw3( palette = c("slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"), n = 10, alpha = 1, reverse = FALSE)Arguments
palette | Palette type. There are 22 available options:
|
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_tw3("rose")(10))show_col(pal_tw3("rose", n = 30, alpha = 0.6, reverse = TRUE)(30))The University of Chicago color palettes
Description
Color palettes based on the colors used by the University of Chicago.
Usage
pal_uchicago(palette = c("default", "light", "dark"), alpha = 1)Arguments
palette | Palette type.There are three available options:
|
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://news.uchicago.edu/sites/default/files/UCM_UniversityIdentityGuidelines_2-2020.pdf
Examples
library("scales")show_col(pal_uchicago("default")(9))show_col(pal_uchicago("light")(9))show_col(pal_uchicago("dark")(9))UCSC Genome Browser color palette
Description
Color palette from UCSC Genome Browser chromosome colors.
Usage
pal_ucscgb(palette = c("default"), alpha = 1)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_ucscgb("default")(26))show_col(pal_ucscgb("default", alpha = 0.6)(26))Bootstrap 5 color palettes
Description
Bootstrap 5 color palettes.
Usage
rgb_bs5( palette = c("blue", "indigo", "purple", "pink", "red", "orange", "yellow", "green", "teal", "cyan", "gray"), n = 10, alpha = 1, reverse = FALSE)Arguments
palette | Palette type. There are 11 available options:
|
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://getbootstrap.com/docs/5.3/customize/color/#all-colors
Examples
library("scales")show_col(pal_bs5("indigo")(10))show_col(pal_bs5("indigo", n = 30, alpha = 0.6, reverse = TRUE)(30))The GSEA GenePattern color palettes
Description
Color palette inspired by the colors used in theheatmaps plotted by GSEA GenePattern.
Usage
rgb_gsea(palette = c("default"), n = 12, alpha = 1, reverse = FALSE)Arguments
palette | Palette type.Currently there is one available option: |
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Note
The 12 base colors used in this palette are derived from theHeatMapImage documentation.
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("scales")show_col(pal_gsea("default")(12))show_col(pal_gsea("default", n = 30, alpha = 0.6, reverse = TRUE)(30))Material Design color palettes
Description
Material Design 2 color palettes.
Usage
rgb_material( palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"), n = 10, alpha = 1, reverse = FALSE)Arguments
palette | Palette type. There are 19 available options:
|
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://m2.material.io/design/color/the-color-system.html
Examples
library("scales")show_col(pal_material("indigo")(10))show_col(pal_material("indigo", n = 30, alpha = 0.6, reverse = TRUE)(30))Tailwind CSS color palettes
Description
Tailwind CSS color palettes.
Usage
rgb_tw3( palette = c("slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"), n = 10, alpha = 1, reverse = FALSE)Arguments
palette | Palette type. There are 22 available options:
|
n | Number of individual colors to be generated. |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://tailwindcss.com/docs/customizing-colors
Examples
library("scales")show_col(pal_tw3("rose")(10))show_col(pal_tw3("rose", n = 30, alpha = 0.6, reverse = TRUE)(30))AAAS journal color scales
Description
Seepal_aaas() for details.
Usage
scale_color_aaas(palette = c("default"), alpha = 1, ...)scale_colour_aaas(palette = c("default"), alpha = 1, ...)scale_fill_aaas(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_aaas()example_barplot() + scale_fill_aaas()Atlassian Design System color scales
Description
Seepal_atlassian() for details.
Usage
scale_color_atlassian(palette = c("categorical8"), alpha = 1, ...)scale_colour_atlassian(palette = c("categorical8"), alpha = 1, ...)scale_fill_atlassian(palette = c("categorical8"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
Atlassian (2025). "Atlassian Design System categorical chart colors."https://atlassian.design/foundations/color-new/data-visualization-color
Examples
example_scatterplot() + scale_color_atlassian()example_barplot() + scale_fill_atlassian()BMJ color scales
Description
Seepal_bmj() for details.
Usage
scale_color_bmj(palette = c("default"), alpha = 1, ...)scale_colour_bmj(palette = c("default"), alpha = 1, ...)scale_fill_bmj(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Hui Chen |huichen@zju.edu.cn
References
https://technology.bmj.com/living-style-guide/colour.html
Examples
example_scatterplot() + scale_color_bmj()example_barplot() + scale_fill_bmj()Bootstrap 5 color scales
Description
Seepal_bs5() for details.
Usage
scale_color_bs5( palette = c("blue", "indigo", "purple", "pink", "red", "orange", "yellow", "green", "teal", "cyan", "gray"), alpha = 1, reverse = FALSE, ...)scale_colour_bs5( palette = c("blue", "indigo", "purple", "pink", "red", "orange", "yellow", "green", "teal", "cyan", "gray"), alpha = 1, reverse = FALSE, ...)scale_fill_bs5( palette = c("blue", "indigo", "purple", "pink", "red", "orange", "yellow", "green", "teal", "cyan", "gray"), alpha = 1, reverse = FALSE, ...)Arguments
palette | Palette type. There are 11 available options:
|
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("ggplot2")data("mtcars")cor <- abs(cor(mtcars))cor_melt <- data.frame( Var1 = rep(seq_len(nrow(cor)), times = ncol(cor)), Var2 = rep(seq_len(ncol(cor)), each = nrow(cor)), value = as.vector(cor))ggplot( cor_melt, aes(x = Var1, y = Var2, fill = value)) + geom_tile(colour = "black", size = 0.3) + theme_bw() + scale_fill_bs5("teal")COSMIC color scales
Description
Seepal_cosmic() for details.
Usage
scale_color_cosmic( palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"), alpha = 1, ...)scale_colour_cosmic( palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"), alpha = 1, ...)scale_fill_cosmic( palette = c("hallmarks_light", "hallmarks_dark", "signature_substitutions"), alpha = 1, ...)Arguments
palette | Palette type. Currently there are three available options:
The |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Joshua H. Cook |joshuacook0023@gmail.com |@jhrcook
Examples
example_scatterplot() + scale_color_cosmic()example_barplot() + scale_fill_cosmic()D3.js color scales
Description
Seepal_d3() for details.
Usage
scale_color_d3( palette = c("category10", "category20", "category20b", "category20c"), alpha = 1, ...)scale_colour_d3( palette = c("category10", "category20", "category20b", "category20c"), alpha = 1, ...)scale_fill_d3( palette = c("category10", "category20", "category20b", "category20c"), alpha = 1, ...)Arguments
palette | Palette type. There are four available options:
|
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md
Examples
p1 <- example_scatterplot()p2 <- example_barplot()p1 + scale_color_d3()p2 + scale_fill_d3()p1 + scale_color_d3(palette = "category20")p2 + scale_fill_d3(palette = "category20")p1 + scale_color_d3(palette = "category20b")p2 + scale_fill_d3(palette = "category20b")p1 + scale_color_d3(palette = "category20c")p2 + scale_fill_d3(palette = "category20c")Flat UI color scales
Description
Seepal_flatui() for details.
Usage
scale_color_flatui( palette = c("default", "flattastic", "aussie"), alpha = 1, ...)scale_colour_flatui( palette = c("default", "flattastic", "aussie"), alpha = 1, ...)scale_fill_flatui( palette = c("default", "flattastic", "aussie"), alpha = 1, ...)Arguments
palette | Palette type. Currently there are three available options:
|
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Clara Jégousse |cat3@hi.is
Examples
p1 <- example_scatterplot()p2 <- example_barplot()p1 + scale_color_flatui()p2 + scale_fill_flatui()p1 + scale_color_flatui(palette = "default")p2 + scale_fill_flatui(palette = "default")p1 + scale_color_flatui(palette = "flattastic")p2 + scale_fill_flatui(palette = "flattastic")p1 + scale_color_flatui(palette = "aussie")p2 + scale_fill_flatui(palette = "aussie")Frontiers journal color scales
Description
Seepal_frontiers() for details.
Usage
scale_color_frontiers(palette = c("default"), alpha = 1, ...)scale_colour_frontiers(palette = c("default"), alpha = 1, ...)scale_fill_frontiers(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Clara Jégousse |cat3@hi.is
Examples
example_scatterplot() + ggplot2::theme_dark() + ggplot2::theme( panel.background = ggplot2::element_rect(fill = "#2D2D2D"), legend.key = ggplot2::element_rect(fill = "#2D2D2D") ) + scale_color_frontiers()example_barplot() + ggplot2::theme_dark() + ggplot2::theme( panel.background = ggplot2::element_rect(fill = "#2D2D2D") ) + scale_fill_frontiers()Futurama color scales
Description
Seepal_futurama() for details.
Usage
scale_color_futurama(palette = c("planetexpress"), alpha = 1, ...)scale_colour_futurama(palette = c("planetexpress"), alpha = 1, ...)scale_fill_futurama(palette = c("planetexpress"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_futurama()example_barplot() + scale_fill_futurama()The GSEA GenePattern color scales
Description
Seepal_gsea() for details.
Usage
scale_color_gsea(palette = c("default"), alpha = 1, reverse = FALSE, ...)scale_colour_gsea(palette = c("default"), alpha = 1, reverse = FALSE, ...)scale_fill_gsea(palette = c("default"), alpha = 1, reverse = FALSE, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("ggplot2")data("mtcars")cor <- cor(mtcars)cor_melt <- data.frame( Var1 = rep(seq_len(nrow(cor)), times = ncol(cor)), Var2 = rep(seq_len(ncol(cor)), each = nrow(cor)), value = as.vector(cor))ggplot( cor_melt, aes(x = Var1, y = Var2, fill = value)) + geom_tile(colour = "black", size = 0.3) + theme_bw() + scale_fill_gsea()Integrative Genomics Viewer (IGV) color scales
Description
Seepal_igv() for details.
Usage
scale_color_igv(palette = c("default", "alternating"), alpha = 1, ...)scale_colour_igv(palette = c("default", "alternating"), alpha = 1, ...)scale_fill_igv(palette = c("default", "alternating"), alpha = 1, ...)Arguments
palette | Palette type.There are two available options:
|
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
p1 <- example_scatterplot()p2 <- example_barplot()p1 + scale_color_igv()p2 + scale_fill_igv()p1 + ggplot2::scale_colour_manual( values = rep(pal_igv("alternating")(2), times = 3))p2 + ggplot2::scale_fill_manual( values = rep(pal_igv("alternating")(2), times = 3))iTerm color scales
Description
Seepal_iterm() for details.
Usage
scale_color_iterm( palette = iterm_palettes(), variant = c("normal", "bright"), alpha = 1, ...)scale_colour_iterm( palette = iterm_palettes(), variant = c("normal", "bright"), alpha = 1, ...)scale_fill_iterm( palette = iterm_palettes(), variant = c("normal", "bright"), alpha = 1, ...)Arguments
palette | Palette name. See |
variant | Variant of the palette. One of |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Details
Preview all available iTerm color palettes in ggsci:https://nanx.me/ggsci-iterm/.
Examples
example_scatterplot() + scale_color_iterm("Rose Pine")example_barplot() + scale_fill_iterm("Rose Pine")Journal of the American Medical Association color scales
Description
Seepal_jama() for details.
Usage
scale_color_jama(palette = c("default"), alpha = 1, ...)scale_colour_jama(palette = c("default"), alpha = 1, ...)scale_fill_jama(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_jama()example_barplot() + scale_fill_jama()Journal of Clinical Oncology color scales
Description
Seepal_jco() for details.
Usage
scale_color_jco(palette = c("default"), alpha = 1, ...)scale_colour_jco(palette = c("default"), alpha = 1, ...)scale_fill_jco(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_jco()example_barplot() + scale_fill_jco()Lancet journal color scales
Description
Seepal_lancet() for details.
Usage
scale_color_lancet(palette = c("lanonc"), alpha = 1, ...)scale_colour_lancet(palette = c("lanonc"), alpha = 1, ...)scale_fill_lancet(palette = c("lanonc"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_lancet()example_barplot() + scale_fill_lancet()LocusZoom color scales
Description
Seepal_locuszoom() for details.
Usage
scale_color_locuszoom(palette = c("default"), alpha = 1, ...)scale_colour_locuszoom(palette = c("default"), alpha = 1, ...)scale_fill_locuszoom(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_locuszoom()example_barplot() + scale_fill_locuszoom()Material Design color scales
Description
Seepal_material() for details.
Usage
scale_color_material( palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"), alpha = 1, reverse = FALSE, ...)scale_colour_material( palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"), alpha = 1, reverse = FALSE, ...)scale_fill_material( palette = c("red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal", "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey"), alpha = 1, reverse = FALSE, ...)Arguments
palette | Palette type. There are 19 available options:
|
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("ggplot2")data("mtcars")cor <- abs(cor(mtcars))cor_melt <- data.frame( Var1 = rep(seq_len(nrow(cor)), times = ncol(cor)), Var2 = rep(seq_len(ncol(cor)), each = nrow(cor)), value = as.vector(cor))ggplot( cor_melt, aes(x = Var1, y = Var2, fill = value)) + geom_tile(colour = "black", size = 0.3) + theme_bw() + scale_fill_material("blue-grey")NEJM color scales
Description
Seepal_nejm() for details.
Usage
scale_color_nejm(palette = c("default"), alpha = 1, ...)scale_colour_nejm(palette = c("default"), alpha = 1, ...)scale_fill_nejm(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_nejm()example_barplot() + scale_fill_nejm()NPG journal color scales
Description
Seepal_npg() for details.
Usage
scale_color_npg(palette = c("nrc"), alpha = 1, ...)scale_colour_npg(palette = c("nrc"), alpha = 1, ...)scale_fill_npg(palette = c("nrc"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_npg()example_barplot() + scale_fill_npg()Observable 10 color scales
Description
Seepal_observable() for details.
Usage
scale_color_observable(palette = c("observable10"), alpha = 1, ...)scale_colour_observable(palette = c("observable10"), alpha = 1, ...)scale_fill_observable(palette = c("observable10"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
Pettiross J (2023). "Crafting data colors and staying on brand."Observable blog.https://observablehq.com/blog/crafting-data-colors
Examples
example_scatterplot() + scale_color_observable()example_barplot() + scale_fill_observable()Primer color scales
Description
Seepal_primer() for details.
Usage
scale_color_primer(palette = c("mark17"), alpha = 1, ...)scale_colour_primer(palette = c("mark17"), alpha = 1, ...)scale_fill_primer(palette = c("mark17"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
GitHub (2025). "Primer data visualization colors."https://primer.style/product/ui-patterns/data-visualization/
Examples
example_scatterplot() + scale_color_primer()example_barplot() + scale_fill_primer()Rick and Morty color scales
Description
Seepal_rickandmorty() for details.
Usage
scale_color_rickandmorty(palette = c("schwifty"), alpha = 1, ...)scale_colour_rickandmorty(palette = c("schwifty"), alpha = 1, ...)scale_fill_rickandmorty(palette = c("schwifty"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_rickandmorty()example_barplot() + scale_fill_rickandmorty()The Simpsons color scales
Description
Seepal_simpsons() for details.
Usage
scale_color_simpsons(palette = c("springfield"), alpha = 1, ...)scale_colour_simpsons(palette = c("springfield"), alpha = 1, ...)scale_fill_simpsons(palette = c("springfield"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_simpsons()example_barplot() + scale_fill_simpsons()Star Trek color scales
Description
Seepal_startrek() for details.
Usage
scale_color_startrek(palette = c("uniform"), alpha = 1, ...)scale_colour_startrek(palette = c("uniform"), alpha = 1, ...)scale_fill_startrek(palette = c("uniform"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_startrek()example_barplot() + scale_fill_startrek()Tron Legacy color scales
Description
Seepal_tron() for details.
Usage
scale_color_tron(palette = c("legacy"), alpha = 1, ...)scale_colour_tron(palette = c("legacy"), alpha = 1, ...)scale_fill_tron(palette = c("legacy"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + ggplot2::theme_dark() + ggplot2::theme( panel.background = ggplot2::element_rect(fill = "#2D2D2D"), legend.key = ggplot2::element_rect(fill = "#2D2D2D") ) + scale_color_tron()example_barplot() + ggplot2::theme_dark() + ggplot2::theme( panel.background = ggplot2::element_rect(fill = "#2D2D2D") ) + scale_fill_tron()Tailwind CSS color scales
Description
Seepal_tw3() for details.
Usage
scale_color_tw3( palette = c("slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"), alpha = 1, reverse = FALSE, ...)scale_colour_tw3( palette = c("slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"), alpha = 1, reverse = FALSE, ...)scale_fill_tw3( palette = c("slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"), alpha = 1, reverse = FALSE, ...)Arguments
palette | Palette type. There are 22 available options:
|
alpha | Transparency level, a real number in (0, 1].See |
reverse | Logical. Should the order of the colors be reversed? |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
library("ggplot2")data("mtcars")cor <- abs(cor(mtcars))cor_melt <- data.frame( Var1 = rep(seq_len(nrow(cor)), times = ncol(cor)), Var2 = rep(seq_len(ncol(cor)), each = nrow(cor)), value = as.vector(cor))ggplot( cor_melt, aes(x = Var1, y = Var2, fill = value)) + geom_tile(colour = "black", size = 0.3) + theme_bw() + scale_fill_tw3("slate")The University of Chicago color scales
Description
Seepal_uchicago() for details.
Usage
scale_color_uchicago(palette = c("default", "light", "dark"), alpha = 1, ...)scale_colour_uchicago(palette = c("default", "light", "dark"), alpha = 1, ...)scale_fill_uchicago(palette = c("default", "light", "dark"), alpha = 1, ...)Arguments
palette | Palette type.There are three available options:
|
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
References
https://news.uchicago.edu/sites/default/files/UCM_UniversityIdentityGuidelines_2-2020.pdf
Examples
p1 <- example_scatterplot()p2 <- example_barplot()p1 + scale_color_uchicago()p2 + scale_fill_uchicago()p1 + scale_color_uchicago(palette = "light")p2 + scale_fill_uchicago(palette = "light")p1 + scale_color_uchicago(palette = "dark")p2 + scale_fill_uchicago(palette = "dark")UCSC Genome Browser color scales
Description
Seepal_ucscgb() for details.
Usage
scale_color_ucscgb(palette = c("default"), alpha = 1, ...)scale_colour_ucscgb(palette = c("default"), alpha = 1, ...)scale_fill_ucscgb(palette = c("default"), alpha = 1, ...)Arguments
palette | Palette type.Currently there is one available option: |
alpha | Transparency level, a real number in (0, 1].See |
... | Additional parameters for |
Author(s)
Nan Xiao |me@nanx.me |https://nanx.me
Examples
example_scatterplot() + scale_color_ucscgb()example_barplot() + scale_fill_ucscgb()