Skip to content

Commit b2cd457

Browse files
BUG: Pass integers to Bokeh RGB constructor (#1164)
* roudning error in RGB functionality * Update backtesting/_plotting.py
1 parent 5a59c4e commit b2cd457

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/_plotting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def colorgen():
9090
def lightness(color, lightness=.94):
9191
rgb = np.array([color.r, color.g, color.b]) / 255
9292
h, _, s = rgb_to_hls(*rgb)
93-
rgb = np.array(hls_to_rgb(h, lightness, s)) * 255.
93+
rgb = (np.array(hls_to_rgb(h, lightness, s)) * 255).astype(int)
9494
return RGB(*rgb)
9595

9696

0 commit comments

Comments
 (0)