University-inspired matplotlib color palettes and colormaps. Colors are taken directly from University branding guidelines, so there is no specific effort toward perceptual uniformity or accessibility for color blindness beyond the aesthetic choices I made in putting the palettes/colormaps together. Please check your plots/figures with COBLIS or similar.
Installation
To install:
cd ~
git clone git@github.com:avapolzin/rahrah.git
cd rahrah
sudo python3 setupy.py install
or
pip install rahrah
If you use this package or the scripts in this repository in a publication, please add a footnote linking to https://github.com/avapolzin/rahrah and/or consider adding this software to your acknowledgments. If you would like to cite rahrah, please use the Zenodo DOI linked here.
I'd love to feature plots/figures that make use of these palettes in the wild, so should these palettes be of use, please send me a copy of that figure and/or a link to your paper or presentation and I will share it here.
(Interested in palettes and colormaps based on album covers? Check out albumpl.)
Palettes/Colormaps
To request the addition of a new school's palette/colormap, please open an issue, linking to the university's branding guidelines.
Included palettes (to now):
-
Albion (Albion College)
-
Amherst (Amherst College)
-
ASU (Arizona State University)
-
Bowdoin (Bowdoin College)
-
Brown (Brown University)
-
BrownBright (Brown University)
-
Caltech (California Institute of Technology)
-
CaltechBright (California Institute of Technology)
-
CarnegieMellon (Carnegie Mellon University)
-
CarnegieMellonBright (Carnegie Mellon University)
-
CUNY (City University of New York)
-
Colgate (Colgate University)
-
Columbia (Columbia University)
-
ColumbiaBright (Columbia University)
-
Cornell (Cornell University)
-
Dartmouth (Dartmouth College)
-
DartmouthMono (Dartmouth College)
-
Duke (Duke University)
-
GeorgiaTech (Georgia Institute of Technology)
-
GSU (Georgia State University)
-
Harvard (Harvard University)
-
HarveyMudd (Harvey Mudd College)
-
Haverford (Haverford College)
-
Indiana (Indiana University)
-
JohnsHopkins (Johns Hopkins University)
-
JohnsHopkinsMono (Johns Hopkins University)
-
MIT (Massachusetts Institute of Technology)
-
MITBright (Massachusetts Institute of Technology)
-
McGill (McGill University)
-
MichiganState (Michigan State University)
-
Middlebury (Middlebury College)
-
NMSU (New Mexico State University)
-
NYU (New York University)
-
NCState (North Carolina State University)
-
NIU (Northern Illinois University)
-
Northwestern (Northwestern University)
-
NotreDame (Notre Dame University)
-
Oberlin (Oberlin College and Conservatory)
-
OhioState (The Ohio State University)
-
OregonState (Oregon State University)
-
PennState (The Pennsylvania State University)
-
Princeton (Princeton University)
-
Purdue (Purdue University)
-
QUB (Queen's University Belfast)
-
QUBBright (Queen's University Belfast)
-
Reed (Reed College)
-
Rutgers (Rutgers, The State University of New Jersey)
-
Stanford (Stanford University)
-
StonyBrook (The State University of New York at Stony Brook)
-
Syracuse (Syracuse University)
-
Arizona (University of Arizona)
-
UBC (University of British Columbia)
-
Berkeley (University of California, Berkeley)
-
UCLA (University of California, Los Angeles)
-
Cambridge (University of Cambridge)
-
Chicago (The University of Chicago)
-
ChicagoBright (The University of Chicago)
-
Colorado (University of Colorado Boulder)
-
UConn (University of Connecticut)
-
Idaho (University of Idaho)
-
Illinois (University of Illinois)
-
Iowa (University of Iowa)
-
Kansas (University of Kansas)
-
Kentucky (University of Kentucky)
-
Oxford (University of Oxford)
-
Maryland (University of Maryland)
-
UMass (University of Massachusetts Amherst)
-
UMassBright (University of Massachusetts Amherst)
-
Michigan (University of Michigan)
-
Minnesota (University of Minnesota)
-
Nebraska (University of Nebraska)
-
UNC (University of North Carolina Chapel Hill)
-
UNCBright (University of North Carolina Chapel Hill)
-
Oregon (University of Oregon)
-
Penn (University of Pennsylvania)
-
Pitt (University of Pittsburgh)
-
USC (University of Southern California)
-
Texas (University of Texas)
-
Toronto (University of Toronto)
-
Utah (University of Utah)
-
UVA (University of Virginia)
-
Washington (University of Washington)
-
Wisconsin (University of Wisconsin)
-
Vanderbilt (Vanderbilt University)
-
Wellesley (Wellesley College)
-
WVU (West Virginia University)
-
Yale (Yale University)
There are also some alternative colormaps that are not the default associated with a specific palette, but are still callable.
How to use rahrah:
- To list all palettes and their properties:
from rahrah.palette import list_palettes
list_palettes()
You can also filter for number of colors in the color cycle or type of colormap (sequential/diverging) with the arguments mincolors and maptype.
- To list all colormaps:
from rahrah.cmap import list_maps
list_maps()
- To set palette as default for both color cycle and colormap:
from rahrah.palette import set_default
set_default('Northwestern')
- To set a palette as default for color cycle or colormap:
from rahrah.palette import set_default_ccycle, set_default_cmap
set_default_ccycle('ChicagoBright')
or
set_default_cmap('Yale')
- To access colormaps without setting them as default:
import matplotlib.pyplot as plt
import rahrah.cmap
plt.imshow(image, cmap = 'USC')
To reverse the colormap, simply append '_r' to the name (e.g., 'USC' becomes 'USC_r').
- To access the colors in a color cycle/palette without setting a default:
from rahrah.palette import return_colors
return_colors('BrownBright')
The lightness of all colormaps is shown below (all sequential maps are shown dark-to-light for easier comparison):
Metadata
Release files for rahrah 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rahrah-0.6.1.tar.gz | 19.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rahrah-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.4 kB
Release files / rahrah-0.6.1.tar.gz
| Download URL | rahrah-0.6.1.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
771d4fb46427dfde5eed93cd438a2d74dbea27acd39cb9ddd0e21a1b4956fa38
|
|
BLAKE2b-256 checksum How to use checksums |
844eb875303c463e8a5fd428b865c8f99e153236b236db91ffcccf05b69cb6a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.12
|
Release files / rahrah-0.6.1-py3-none-any.whl
| Download URL | rahrah-0.6.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28ec3ee017a43ac480301fc82b230f9d6ea404664efb2f18988a38eff9f07f51
|
|
BLAKE2b-256 checksum How to use checksums |
1a1b78a1dc91d939774080099a9b299c9010187c2074fa374cab1d423b2dbf46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.12
|
Security for rahrah 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.