title: Matching CSS RGB color values
body: <p>I have a problem with a piece of JS code. It is supposed to find all occurences of CSS colors values (<code>colorNames</code>, <code>#FFFFFF</code>, <code>#FFF</code>, <code>RGB</code>, <code>transparent</code>) from a given style declaration and replace them with a <code>span</code> element followed by the match itself.</p>
  
  <p>Well, everything seems ok, except the RGB() ones which wasted already my entire day.</p>
  
  <p>A small presentation and the code can be found on <a href="http://jsfiddle.net/YEEnE/8/" rel="nofollow noreferrer">jsFiddle</a>. And here we have a preview with my problematic elements.</p>
  
  <p><img src="https://i.stack.imgur.com/OgEQf.jpg" alt=""></p>
  
  <p>Thanks for your time and interest!</p>