code: function(color) {
              var rgb;
              // color string
              if (color in COLORS) {
                  rgb = COLORS[color];
                  return {
                      r: rgb[0],
                      g: rgb[1],
                      b: rgb[2]
                  };
              }
              // hex
              else if (color[0] === HASH) {
                  return this._hexToRgb(color.substring(1));
              }
              // rgb string
              else if (color.substr(0, 4) === RGB_PAREN) {
                  rgb = RGB_REGEX.exec(color.replace(/ /g,''));
                  return {
                      r: parseInt(rgb[1], 10),
                      g: parseInt(rgb[2], 10),
                      b: parseInt(rgb[3], 10)
                  };
              }
              // default
              else {
                  return {
                      r: 0,
                      g: 0,
                      b: 0
                  };
              }
          }
docs: get RGB components of a color
  @method
  @memberof Kinetic.Util.prototype
  @param {String} color
  @example
  // each of the following examples return {r:0, g:0, b:255}<br>
  var rgb = Kinetic.Util.getRGB('blue');<br>
  var rgb = Kinetic.Util.getRGB('#0000ff');<br>
  var rgb = Kinetic.Util.getRGB('rgb(0,0,255)');