Created
August 20, 2019 19:00
-
-
Save JamesSaxon/f0641c772705be542845c0080abf788e to your computer and use it in GitHub Desktop.
Hex Colors from MPL Colormap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| N = 12 | |
| ["#{0:02X}{1:02X}{2:02X}".format(*[int(v*255) for v in plt.get_cmap("viridis")(n/(N-1))][:3]) for n in range(N)] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment