Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JBorrow/swiftascmaps
Taylor Swift-inspired color maps
https://github.com/JBorrow/swiftascmaps
Last synced: 1 day ago
JSON representation
Taylor Swift-inspired color maps
- Host: GitHub
- URL: https://github.com/JBorrow/swiftascmaps
- Owner: JBorrow
- License: lgpl-3.0
- Created: 2020-08-26T21:22:49.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-11T21:57:28.000Z (3 months ago)
- Last Synced: 2024-11-07T04:48:38.268Z (7 days ago)
- Language: Python
- Size: 8.5 MB
- Stars: 81
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Taylor Swift color map collection.
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5649259.svg)](https://doi.org/10.5281/zenodo.5649259)
Quick start: `pip install swiftascmaps`
Includes color maps based on the following albums:
+ Red (`red`, `red_r`)
+ 1989 (`nineteen_eighty_nine`, `nineteen_eighty_nine_r`)
+ Reputation (`reputation`, `reputation_r`)
+ Lover (`lover`, `lover_r`)
+ Folklore (`folklore`, `folklore_r`)
+ Evermore (`evermore`, `evermore_r`, `evermore_shifted`, `evermore_shifted_r`)
+ Fearless: Taylor's Version (`fearless_tv`, `fearless_tv_r`)
+ Red: Taylor's Version (`red_tv`, `red_tv_r`)
+ Midnights (`midnights`, `midnights_r`)
+ Speak Now: Taylor's Version (`speak_now_tv`, `speak_now_tv_r`)
+ 1989: Taylor's Version (nineteen_eighty_nine_tv, nineteen_eighty_nine_tv_r)License: LGPLv3
Author: Josh Borrow ([email protected])If you prefer to use `R`, there is an alternative package
maintained as [taloRswift](https://github.com/asteves/tayloRswift).Usage
-----To use these, you can import them and use them
with matplotlib as you would with any other color map.```python
from swiftascmaps import red
from matplotlib.pyplot import imshow
from numpy import randomimshow(random.rand(128, 128), cmap=red)
```The color maps can also be accessed in matplotlib using strings
by prefixing `swift`, e.g.```python
import swiftascmapsimshow(random.rand(128, 128), cmap="swift.red")
```Examples
--------![](images/maps.png)
Note
----Of course, these aren't necessarily designed to be colorblind
friendly, or perceptually uniform, so use them with caution.
They are quite pretty though. To underline how much you should
_not_ use these in a real scientific publication (apart from
perhaps qualitative imaging), the lightness values are shown
below.![](images/uniformity.png)
For quantitative comparisons, please ensure that you use a
perceptually uniform colour map (see e.g. those available
directly through [matplotlib](https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html)).