Skip to content

Commit 4df3d90

Browse files
committed
Fixing HSL to RGB converter in Python
1 parent 5946f57 commit 4df3d90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/selenium/webdriver/support/color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def hue_to_rgb(lum1, lum2, hue):
113113
g = hue_to_rgb(luminocity1, luminocity2, h)
114114
b = hue_to_rgb(luminocity1, luminocity2, h - 1.0 / 3.0)
115115

116-
return Color(r * 256, g * 256, b * 256, a)
116+
return Color(round(r * 255), round(g * 255), round(b * 255), a)
117117

118118
def __init__(self, red, green, blue, alpha=1):
119119
self.red = int(red)

0 commit comments

Comments
 (0)