title: How to extract color values from rgb string in javascript
body: <p>Javascript code</p>
  
  <pre><code>$(".designer-element").each(function () {
          var $this = $(this),
          var  moot = $this.css(["color", "border-color", "background-color"]);
  } );
  </code></pre>
  
  <p>is used to get element colors. This returns colors as strings like</p>
  
  <pre><code>"background-color": "rgba(0, 0, 0, 0)"
  "border-color": "rgb(211, 211, 211)"
  "color": "rgb(51, 51, 51)"
  </code></pre>
  
  <p>How to extract individual r , g and b values from those strings. a value is not needed.
  Or is there some better  method which returns those color values directly?</p>
  
  <p>substrg cannot used since values have variable sizes 1-3 digits
  Can some regex used ?</p>
  
  <p>html5, jquery, jquery-ui and bootstrap are used.</p>