MCPcopy Index your code
hub / github.com/kernc/backtesting.py / lightness

Function lightness

backtesting/_plotting.py:106–110  ·  view source on GitHub ↗
(color, lightness=.94)

Source from the content-addressed store, hash-verified

104
105
106def lightness(color, lightness=.94):
107 rgb = np.array([color.r, color.g, color.b]) / 255
108 h, _, s = rgb_to_hls(*rgb)
109 rgb = (np.array(hls_to_rgb(h, lightness, s)) * 255).astype(int)
110 return RGB(*rgb)
111
112
113_MAX_CANDLES = 10_000

Callers 2

plotFunction · 0.85
_plot_superimposed_ohlcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected