function rgbToHex(value) {
  var values = _.map(value.match(/\d+/g), function(value) {
    return _.padStart(parseInt(value, 10).toString(16), 2, '0');
  });

  return values.length > 2 ? formatStringEx('#{[0]}{[1]}{[2]}', values) : undefined;
}
Converts an css rgb color value to hex.

@static
@memberOf _
@param {string} value - The rgb value to convert.
@returns {string} The hex string.