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
{{ message }}
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
Hi
It seems the clamped method has issue when class has been initialized with is_upscaled=True
>>> from colormath.color_objects import sRGBColor
>>> rgb = sRGBColor( 15,45,65,is_upscaled=True)
>>> rgb
sRGBColor(rgb_r=0.058823529411764705,rgb_g=0.17647058823529413,rgb_b=0.2549019607843137)
>>> rgb.rgb_r
0.058823529411764705
>>> rgb.clamped_rgb_r
1
<< expecting 15The change in BaseRGBColor._clamp_rgb_coordinate would fix the issue:
< return min(max(coord, 1), 255)
> return min(max(int(math.floor(0.5 + coord * 255)), 1), 255)
Thanks
The text was updated successfully, but these errors were encountered: