This file contains 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
def lighten_color(color, amount=0.5): | |
""" | |
Lightens the given color by multiplying (1-luminosity) by the given amount. | |
Input can be matplotlib color string, hex string, or RGB tuple. | |
Examples: | |
>> lighten_color('g', 0.3) | |
>> lighten_color('#F034A3', 0.6) | |
>> lighten_color((.3,.55,.1), 0.5) | |
""" |
This file contains 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
#!/usr/bin/env python | |
try: | |
# for python newer than 2.7 | |
from collections import OrderedDict | |
except ImportError: | |
# use backport from pypi | |
from ordereddict import OrderedDict | |
import yaml |