lib.samples.plotting.lighten_color¶
- lib.samples.plotting.lighten_color(color, amount=0.5)¶
Lightens the given color by multiplying 1-luminosity by the given amount
amount.Taken from https://stackoverflow.com/questions/37765197/darken-or-lighten-a-color-in-matplotlib
>>> lighten_color('g', 0.3) >>> lighten_color('#F034A3', 0.6) >>> lighten_color((.3,.55,.1), 0.5)
- Parameters
color (string, tuple) – matplotlib color string, hex string, or RGB tuple.
amount (float, default=0.5) – Positive number ligthens color, negative darkens color.
- Returns
color – RGB tuple.
- Return type
tuple