Change opacity rgba bug?

Hello, I’m trying to change opacity of buttons by code. The only way AFAIK is by using rgba color code. It only works when I change opacity to zero, doesn’t work any other way. I looked at documentation and forum posts to no av. None of the statements below worked.

$w(‘#button19’).style.backgroundColor = rgba(245,154,40,1);
$w(‘#button19’).style.backgroundColor = “rgba(245,154,40,1)”;
$w(‘#button19’).style.backgroundColor = rgba(245,154,40,1.0); $w(‘#button19’).style.backgroundColor = “rgba(245,154,40,1.0)”;

First of all, you should make sure that it’s set to opacity 100% on the editors.
Second, the opacity set through RGBA is a value between 0 to 1 (I’m not sure why you put a decimal in the last two lines);

decimal because I was experimenting. It works now after setting op 100% in editor but then I will have to write code for all elements to set it back to its default value 0 on my site. Would’ve been great if that was mentioned in documentation. Anyways problem solved thank you.

@adhaca5 yes. You’re right. It should be mentioned in the documentation. We’ve all learnt it by trial and error, and documentation could have saved us some time.