Created
March 1, 2016 09:03
-
-
Save amn41/7880539c5d805e11e4bc to your computer and use it in GitHub Desktop.
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
# I like using seaborn, but of course you can also just use this as a set of colours. | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import numpy as np | |
# from seaborn docs | |
def sinplot(flip=1): | |
x = np.linspace(0, 14, 100) | |
for i in range(1, 7): | |
plt.plot(x, np.sin(x + i * .5) * (7 - i) * flip) | |
toothpasteColors = { | |
"gray":"#C5C5C0", | |
"blue-gray-light": "#DAE3E8", | |
"blue-gray-dark": "#465E68", | |
"blue-gray-darkest":"#222E33", | |
"yellow-light": "#DBCD7F", | |
"yellow": "#49483E", | |
"yellow-dark": "#3E3D32", | |
"yellow-darkest": "#3B3A32", | |
"blue-light": "#96CBFE", | |
"blue": "#769EB3", | |
"cyan": "#73B3C0", | |
"green-light": "#A8FF60", | |
"green": "#9DC777", | |
"green-dark": "#97B853", | |
#"green-translucent":rgba(111, 191, 111, 0.83), <-- left out for simplicity | |
"orange": "#E9C062", | |
"orange-dark": "#C88E4B", | |
"red-light": "#E36868", | |
"red": "#CC6666", | |
"magenta": "#C5487A", | |
"purple": "#9B82C9" | |
} | |
np.random.seed(666) | |
toothpaste = np.random.shuffle([toothpasteColors[k] for k in toothpasteColors]) | |
sns.set_palette(sns.color_palette(toothpaste)) | |
sinplot() | |
plt.savefig('toothpaste.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment