src/illustrator/swatches.js
function getMaxShades(colors) {
  var max = 0;
  var colorGroups = getColorGroups(colors);

  colorGroups.forEach(function (colorGroup, colorGroupIndex) {
    // Gets colors that belong to group.
    var groupColors = colors.filter(function (o) {
      return o.group === colorGroup;
    });

    var len = groupColors.length;

    if (len > max) {
      max = len;
    }
  });

  return max;
}
function getMaxShades(colors) {
  var max = 0;
  var colorGroups = getColorGroups(colors);

  colorGroups.forEach(function (colorGroup, colorGroupIndex) {
    // Gets colors that belong to group.
    var groupColors = colors.filter(function (o) {
      return o.group === colorGroup;
    });

    var len = groupColors.length;

    if (len > max) {
      max = len;
    }
  });

  return max;
}
function getMaxShades ( colors ) { var max = 0 ; var colorGroups = getColorGroups ( colors ) ; colorGroups . forEach ( function ( colorGroup , colorGroupIndex ) { // Gets colors that belong to group. var groupColors = colors . filter ( function ( o ) { return o . group === colorGroup ; } ) ; var len = groupColors . length ; if ( len > max ) { max = len ; } } ) ; return max ; }
Returns maximum number of shades.

@param   {Array} colors
@returns {Number}
Returns maximum number of shades .