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
I've been experimenting with go-colorful and noticed that for the edge cases (t = 0 and t = 1), the resulting colors are actually slightly different from what is suggested.
Where as I would expect G to be 0.0 in the first case, and R to be 0.0 in the later case. Also, from the negative sign assigned to "B", I'm guessing that both of those are slightly off as well.
Is it possible that there is an off-by-one error somewhere?
If not, and the interpolation calculations simply don't allow this kind of precise generation of boundary cases, a minor / simple improvement might be to clip all resulting colors so that the RGB vals fall within [0, 1]?
If I have the time down the road, I will try and look into it myself, but I'm still only just learning Go, so it may be a little while :)
Thanks for your work on this great package!
The text was updated successfully, but these errors were encountered:
Hello, thanks for reporting this! I'll have to look into the package more deeply to see where this error is coming from. For now I have clamped the output of BlendHCL in d49a4a4, and this will be in the next release.
It's worth noting that the errors you've noticed are well below 1/256, and so will not have any effect on the displayed RGB values.
Greetings!
I've been experimenting with
go-colorful
and noticed that for the edge cases (t = 0
andt = 1
), the resulting colors are actually slightly different from what is suggested.For example:
Where as I would expect G to be 0.0 in the first case, and R to be 0.0 in the later case. Also, from the negative sign assigned to "B", I'm guessing that both of those are slightly off as well.
Is it possible that there is an off-by-one error somewhere?
If not, and the interpolation calculations simply don't allow this kind of precise generation of boundary cases, a minor / simple improvement might be to clip all resulting colors so that the RGB vals fall within
[0, 1]
?If I have the time down the road, I will try and look into it myself, but I'm still only just learning Go, so it may be a little while :)
Thanks for your work on this great package!
The text was updated successfully, but these errors were encountered: