You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Ben,
I am using your RGB Converter in a project I am doing and noticed that if your rgb_to_xy() method is called with an RGB value of (0,0,0), a divide by zero error occurs.
I have made the following change to the method:
if not (red or green or blue):
point = XYPoint(0,0)
else:
point = self.color.get_xy_point_from_rgb(red, green, blue)
return (point.x, point.y)
I thought you'd like to know.
Thanks for the classes they are very useful :-)
The text was updated successfully, but these errors were encountered:
Hi Ben,
I am using your RGB Converter in a project I am doing and noticed that if your rgb_to_xy() method is called with an RGB value of (0,0,0), a divide by zero error occurs.
I have made the following change to the method:
if not (red or green or blue):
point = XYPoint(0,0)
else:
point = self.color.get_xy_point_from_rgb(red, green, blue)
return (point.x, point.y)
I thought you'd like to know.
Thanks for the classes they are very useful :-)
The text was updated successfully, but these errors were encountered: