Skip to content

Commit b2acde6

Browse files
authored
Update backtesting/_plotting.py
1 parent c7c9733 commit b2acde6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

backtesting/_plotting.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ def colorgen():
8888
def lightness(color, lightness=.94):
8989
rgb = np.array([color.r, color.g, color.b]) / 255
9090
h, _, s = rgb_to_hls(*rgb)
91-
rgb = np.array(hls_to_rgb(h, lightness, s)) * 255
92-
rgb = np.rint(rgb)
91+
rgb = (np.array(hls_to_rgb(h, lightness, s)) * 255).astype(int)
9392
return RGB(*rgb)
9493

9594

0 commit comments

Comments
 (0)