so I was working on a color library (yes I know c&c exists but I wanted to see what I could make myself, at Snap! Build Your Own Blocks) and for some reason when I decode text -> color for the default color for color inputs, the alpha becomes 1. I have no Idea why, and the whole thing works if the rgb is even 1 different from the default color. check out the project if you need. thanks!
First of all, why are you in dev mode version? I loaded the project in regular Snap! and nothing broke. Secondly, for some reason the text of a colour uses an alpha value from 0 to 1, not 0 to 255. I can't reproduce the part where, when you change it from the default colour, it works the way you want, however.
Here is a fixed version of the blocks:
its literally right in the project.
dev version. and I don't know why, but the glitch is in both places.
snap internally seems to use 1, not 255, which I like more anyway, so yeah.
It's probably because of this whole thread.
I think the color inputs just aren't supposed to have an alpha channel, and you're kind of using a weird hack to even get the color inputs to have alpha (or at least, not the officially supported method).
Oops . I just thought that that was some random code. I didn't fully realize the implications. Sorry!
Yeah, I realized that later on. I was just thinking that bugs in dev version aren't supposed to be reported yet because it is prerelease. But now I get it.
On the other hand, it would be nice to have some consistency.
After some quick investigating, it seems to be that the problem occurs when the selected colour in the block you are joining to is the same as the rgb you are putting in:
So one could create a pretty quick fix for the time being.
ah, ok! still a bug though.
great detective work!
unfortunately this was not fixed in 10.4.0.
and I'm not going to, because alpha is, technically, not relevant for color slots in Snap.
ok I guess...
it's kind of the only way to get a non-costume color though.