rgbColorToHex_(red, green, blue) {
    // Rather than supporting 64 colors, this decoder supports 8 colors and
    // gets the closest color, as per 9.19 of CEA-708-E. This is because some
    // colors on television such as white, are often sent with lower intensity
    // and often appear dull/greyish on the browser, making them hard to read.

    // As per CEA-708-E 9.19, these mappings will map 64 colors to 8 colors.
    const colorMapping = {0: 0, 1: 0, 2: 1, 3: 1};
    red = colorMapping[red];
    green = colorMapping[green];
    blue = colorMapping[blue];

    const colorCode = (red << 2) | (green << 1) | blue;
    return shaka.cea.Cea708Service.Colors[colorCode];
  }
Maps 64 possible CEA-708 colors to 8 CSS colors.
@param {number} red value from 0-3
@param {number} green value from 0-3
@param {number} blue value from 0-3
@return {string}
@private