Most universities use specific color combinations to express their unique brand identity. The unicol package provides the colors and color palettes of various universities for easy plotting and printing in R. We collect and provide a diverse range of color palettes for creating scientific visualizations.
Our primary goal is to make it simple to create beautiful visualizations that are in accordance with institutional regulations and style guides. Assuming that you have some R code for creating an image, unicol allows you to directly use the color palette of your institution.
The latest release of unicol is available from CRAN at https://CRAN.R-project.org/package=unicol:
install.packages('unicol') # install from CRAN client
library('unicol') # load the package
The current development version can be installed from its GitHub repository at https://github.com/hneth/unicol/:
# install.packages('devtools') # install pkg
::install_github('hneth/unicol') devtools
The unicol package is based on the R package unikn and requires it for key functionality.
The unicol package provides colors and color palettes, whereas the unikn package provides color-related functions:
library(unicol) # for color palettes
library(unikn) # for color functions
The unicol package currently provides 269 color palettes from 116 institutions.
(See the vignette All color palettes for an overview of included color palettes and institutions.)
Figure 1 illustrates 50 random color palettes (with 202 colors):
As the unicol palettes are provided as vectors of R
colors, they can simply be used as the col
argument of R
graphics functions. For instance, we can use the MIT colors (of the Massachusetts Institute of Technology)
in a bar plot (with the barplot()
function of the base R
graphics package) as follows:
barplot(height = 1:10,
col = mit,
main = "Using the MIT colors")
To modify a color palette (e.g., by resizing the palette or adding
transparency), we use the usecol()
function of the
unikn
package:
barplot(height = 1/sqrt(1:16),
col = usecol(mit, n = 16),
main = "A color gradient of MIT colors")
Here are some some additional examples how the color palettes from unicol can be used:
# Viewing a color palette:
::seecol(yale, main = "The primary colors of Yale University") unikn
# Demo plots:
::demopal(berkeley_1, type = 2, main = "The colors of Berkeley, University of California", seed = 3) unikn
::demopal(limerick_1, type = 3, main = "Using the colors of the University of Limerick", seed = 3) unikn
The current range of color palettes included in unicol is highly selective and incomplete. However, we are happy to include color palettes and institutions from all over the world.
If you are missing a color palette, you can easily create and add it.
For instructions on how this can be done, please see the documentation
of the newpal()
function (of the unikn
package). The vignette on Institutional
colors provides a corresponding example.
Call for contributions: Collecting color palettes
If you do, please let us know (e.g., on this GitHub issue) so that we can include it in future versions of the unicol package. To enable us to verify and provide credit to your contributions, please send us the following information:
newpal()
command creating your
color palette),We’re looking forward to your inputs and contributions (at this GitHub issue)!
The following versions of unicol and corresponding resources are available:
Type: | Version: | URL: |
---|---|---|
A. unicol (R package): | Release version | https://CRAN.R-project.org/package=unicol |
Development version | https://github.com/hneth/unicol/ | |
B. Online documentation: | Release version | https://hneth.github.io/unicol/ |
Development version | https://hneth.github.io/unicol/dev/ |
The unicol package originated as a collaborative project of the following course:
unicol (created by Hansjörg Neth et al.) is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. (Based on a work at https://github.com/hneth/unicol).
The unicol package is based on the R package unikn and loads key functionality from it.
To support our efforts, please cite the unicol package in your derivations or publications:
A BibTeX entry for LaTeX users is:
@Manual{,
title = {unicol: The colors of your university},
author = {Hansjoerg Neth and Constantin Basler and Paula Bauer and Kaethe Bodenstein and Franziska Drechsel and Gina-Loretta Franz and Karolin Heiss and Julia Koenig and Isabelle Krist and Larissa Schwab and Alina Sohst and Isabel Staatz and Lisa Trueb},
year = {2024},
organization = {Social Psychology and Decision Sciences, University of Konstanz},
address = {Konstanz, Germany},
note = {R package (version 0.3.0, May 1, 2024)},
url = {https://CRAN.R-project.org/package=unicol},
doi = {10.5281/zenodo.8252106},
}
The copyrights to all unicol designs remain with their original creators.
[File README.Rmd
updated on 2024-05-01.]