code: function (productType, color) {
              if (color && productType) {
                  var colorHash = productTypeToColorMap[productType.$.id],
                      appearances;
  
                  if (colorHash) {
                      appearances = colorHash[color.toString()];
                  }
  
                  if (appearances && appearances.length) {
                      return appearances[0];
                  }
              }
              return null;
          }
docs: *
  
  @param {sprd.model.ProductType} productType
  @param {js.type.Color} color
  @returns {*}