code: function parseColor(val) {
      if (_cache[val])
        return _cache[val];
  
      var result = [0, 0, 0];
  
      if (val.match(/^#/)) {
        val = (val || '').replace(/^#/, '');
        result = (val.length === 3) ?
          [
            parseInt(val.charAt(0) + val.charAt(0), 16),
            parseInt(val.charAt(1) + val.charAt(1), 16),
            parseInt(val.charAt(2) + val.charAt(2), 16)
          ] :
          [
            parseInt(val.charAt(0) + val.charAt(1), 16),
            parseInt(val.charAt(2) + val.charAt(3), 16),
            parseInt(val.charAt(4) + val.charAt(5), 16)
          ];
      } else if (val.match(/^ *rgba? *\(/)) {
        val = val.match(
          /^ *rgba? *\( *([0-9]*) *, *([0-9]*) *, *([0-9]*) *(,.*)?\) *$/
        );
        result = [
          +val[1],
          +val[2],
          +val[3]
        ];
      }
  
      _cache[val] = {
        r: result[0],
        g: result[1],
        b: result[2]
      };
  
      return _cache[val];
    }
docs: TOOLING FUNCTIONS: ******************