title: Why transparency rgba works only first time
body: <p>Transparency should be changed with the rgba, but rgb should not be changed. Only "a" should be changeable. It only works the first time, if I want to change the second time the value is null. Where am I wrong?</p>
  
  <pre><code>&lt;select id="elementbackgroundtransparency" onchange="ElementBackgroundTransparency()"&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;                 
      &lt;option value="0.1"&gt;0.1&lt;/option&gt;                 
      &lt;option value="0.2"&gt;0.2&lt;/option&gt;                
      &lt;option value="0.3"&gt;0.3&lt;/option&gt;                 
      &lt;option value="0.4"&gt;0.4&lt;/option&gt;                 
      &lt;option value="0.5"&gt;0.5&lt;/option&gt;                 
      &lt;option value="0.6"&gt;0.6&lt;/option&gt;
      &lt;option value="0.7"&gt;0.7&lt;/option&gt;
      &lt;option value="0.8"&gt;0.8&lt;/option&gt;
      &lt;option value="0.9"&gt;0.9&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;div id="color" style="height:50px;width:50px;background-color:rgba(255,0,0,0.3);"&gt;&lt;/div&gt;
  </code></pre>
  
  <pre><code>function ElementBackgroundTransparency(){
          var t = document.getElementById("elementbackgroundtransparency").value;
          var elem = document.getElementById("color");
          var theCSSprop = window.getComputedStyle(elem, null).getPropertyValue("background-color");
  
          var rgb = /rgb\((\d+), (\d+), (\d+)\)/.exec(theCSSprop);
          var r = rgb[1];
          var g = rgb[2];
          var b = rgb[3];
          document.getElementById("color").style.backgroundColor = "rgba("+r+", "+g+", "+b+""+", "+t+")";
  
  }
  </code></pre>