function reformatChannels(channels) {
  return channels
    .map(function (channelIndex) {
      return "rgba".charAt(channelIndex);
    })
    .join("");
}
Reformat from an array of channel indices like <code>[0, 1]</code> to a
string of channels as would be used in GLSL swizzling (e.g. "rg")

@param {number[]} channels the channel indices
@return {string} The channels as a string of "r", "g", "b" or "a" characters.
@private