# ggsci gives ggplot2 a palette for the journal you are imitating

> ggsci is an R package of ggplot2 colour palettes drawn from scientific journals, data visualisation libraries, science fiction films and television shows, and the package is a catalogue of small, named vectors rather than a framework.

**nanxstats/ggsci** — 🦄 Scientific journal and sci-fi themed color palettes for ggplot2

- Repository: https://github.com/nanxstats/ggsci
- Website: https://nanx.me/ggsci/
- Stars: 750 · Forks: 69
- Language: R
- License: GPL-3.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/nanxstats-ggsci

## A palette is a named vector, and the name is the point

ggsci offers a collection of ggplot2 colour palettes inspired by scientific journals, data visualisation libraries, science fiction movies and TV shows, and the way you use one is to pass its name to the colour argument of a ggplot2 scale. The package is deliberately a catalogue rather than a system, and installing it is a single call from CRAN or a GitHub install for the development version.

```r
install.packages("ggsci")
```

```r
remotes::install_github("nanxstats/ggsci")
```
 There is no palette generator, no adaptive colour logic and no theme engine, just a set of named vectors that you can point a plot at. That design has an obvious appeal for a working scientist whose target venue has house colours, and an equally obvious appeal for a designer who wants a chart that matches a tool they already use. The gallery in the readme lists the entries with a rendered example for each, which is the fastest way to see what is on offer, and the vignettes page at nanx.me/ggsci/articles/ggsci.html is the quick start guide, openable from R with the vignette call.

## The journal entries are the ones with a reviewer in the room

The scientific journal names come first in the gallery, and they are the entries that have a real audience. NPG, which is the palette associated with Nature Publishing Group, appears at the top, followed by AAAS, NEJM, Lancet, JAMA, BMJ, JCO for the Journal of Clinical Oncology, and UCSCGB for the UC Santa Cruz Genome Browser, with LocusZoom and IGV, the Integrated Genome Viewer, further down. There is also COSMIC, the Catalogue of Somatic Mutations in Cancer, which is shown with three example images rather than one, and a GSEA entry for gene set enrichment analysis work. A UChicago palette rounds out the journal group. The practical reason to reach for a journal palette is that a reviewer or an editor may already expect a figure in that house style, and reproducing a specific colour order by hand from a PDF is a bad use of an afternoon.

## The tooling and popular culture entries are the fun half

The other side of the catalogue is tools and fiction. There is a D3 palette, one for Gephi, the graph drawing library, one for Observable, the data visualisation notebook environment, one for Primer, the design system, and one for Atlassian. There is an iTerm palette, for the terminal emulator, a Flat UI entry, and entries for Bootstrap 5, Material Design and Tailwind CSS, so a chart can match the look of the interface around it. The science fiction and television entries are Star Trek, Tron Legacy, Futurama, Rick and Morty and The Simpsons, and there is a Frontiers entry for the journal of that name. A LocusZoom palette and a GSEA palette sit alongside. The list is the argument for the package, because a palette that is recognisable from a tool you use or a show you watch makes a chart easier to read for the people who will read it.

## The package is a normal CRAN package with a generated readme

The repository layout is the standard R package one, with a DESCRIPTION file, a NAMESPACE, an R/ directory for the code, a man/ directory for the generated documentation, inst/ for shipped assets, tests in the usual place, a vignettes/ directory, and a pkgdown/ directory with a _pkgdown.yml for the documentation site. The readme is generated from README.Rmd, and the file says so at the top, which means the gallery images and the prose are produced by knitting a document rather than edited by hand, and the figures live under man/figures/ with names like README-ggsci-npg-1.png. The badges show an R-CMD-check workflow for the package checks, the current CRAN version, and the download count from the RStudio CRAN mirror, and the package is on CRAN under the GPL-3.0 licence with a NEWS.md for the release history.

## The same palettes exist in Python and Rust

The readme points to two sibling projects under the same maintainer, which is the most useful line in it for anyone who does not work in R. py-ggsci offers the ggsci colour palettes for plotnine in Python, and ggsci-rs offers them for Rust, for Ratatui and for ggsql. The fact that a palette catalogue was ported rather than reinvented tells you something about the palettes themselves, since a colour vector transfers between languages without translation, and it means a team working across R, Python and Rust can standardise on one set of colours rather than approximating them. The vignette link is the same in all three cases, and each project is described as ggsci colour palettes for its own plotting stack.

## Where this is the wrong tool

The limit is that a palette here is a fixed list of colours, and the package is about categorical palettes rather than continuous ones. If your data needs a sequential ramp that maps a numeric variable to colour, or a diverging scale around a meaningful midpoint, the answer is a scale function and a colour ramp, not one of these vectors, and the package description does not claim otherwise. The second limit is that these are discrete colours sampled from a source, so whether the vector matches the current brand or the current journal design is a question of when it was sampled, and a palette that was accurate for a 2019 article design is not a definition of that design. The third is a licensing nuance worth checking rather than assuming. The package itself is GPL-3.0, but a palette that reproduces a journal's or a company's colours is arguably a trademark and brand question rather than a copyright one, and the readme does not discuss it, so anyone publishing a figure in a commercial context should check with the palette owner rather than infer permission from the package licence.

## Conclusion

ggsci suits an R user who wants a figure that looks like it belongs in a particular journal, or who wants a palette from a tool they already use every day such as D3 or Bootstrap, and it suits a Python or Rust user through the sibling ports. It is the wrong tool if you need a palette generated from your own data, because every palette here is a fixed set of colours, and it is the wrong tool if you need a sequential or diverging scale, since the package is about categorical palettes. Before using one, check the vignette for the palette you want, because the difference between the science fiction entries and the journal entries is not one of taste. The last push was on 2026-07-30 and the current release is ggsci 5.2.0 from the same day.

## FAQ

### How do I install ggsci?

Install it from CRAN with install.packages("ggsci"), or try the development version on GitHub with remotes::install_github("nanxstats/ggsci"). The quick start guide is the vignette, browsable on the package site or openable in R with vignette("ggsci").

### What palettes does ggsci provide?

Palettes inspired by scientific journals including NPG, AAAS, NEJM, Lancet, JAMA, BMJ, JCO, UCSCGB, COSMIC, UChicago, GSEA and Frontiers, by data visualisation libraries such as D3, Gephi, Observable and Primer, by company and design systems including Atlassian, iTerm, Flat UI, Bootstrap 5, Material Design and Tailwind CSS, by scientific tools including LocusZoom and IGV, and by science fiction and television including Star Trek, Tron Legacy, Futurama, Rick and Morty and The Simpsons.

### Is ggsci available outside R?

Yes. The README points to py-ggsci, which offers the ggsci colour palettes for plotnine in Python, and to ggsci-rs, which offers them for Rust, for Ratatui and for ggsql.

## Sources

- [License: GPL-3.0](https://github.com/nanxstats/ggsci/blob/master/LICENSE)
- [nanxstats/ggsci on GitHub](https://github.com/nanxstats/ggsci)
- [Project website](https://nanx.me/ggsci/)
- [README](https://github.com/nanxstats/ggsci/blob/master/README.md)
- [Releases](https://github.com/nanxstats/ggsci/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/nanxstats-ggsci
