code: function addSwatch(name, color) {
    var swatch = doc.swatches.add();
    swatch.color = color;
    swatch.name = name;
  
    return swatch;
  }
docs: Adds swatch.
  
  @param   {String} name
  @param   {Color} color
  @returns {Swatch}