* A class to parse color values
*
* NOTE: modified by danvk. I removed the "getHelpXML" function to reduce the
- * file size.
+ * file size, added "use strict" and a few "var" declarations where needed.
*
* @author Stoyan Stefanov <sstoo@gmail.com>
* @link http://www.phpied.com/rgb-color-parser-in-javascript/
* @license Use it if you like it
*/
+"use strict";
+
function RGBColor(color_string)
{
this.ok = false;
var processor = color_defs[i].process;
var bits = re.exec(color_string);
if (bits) {
- channels = processor(bits);
+ var channels = processor(bits);
this.r = channels[0];
this.g = channels[1];
this.b = channels[2];