function rgbColorsAreEqual(rgb1, rgb2) {
  return (rgb1[0] == rgb2[0] && rgb1[1] == rgb2[1] && rgb1[2] == rgb2[2]);
}
This helper method compares two RGB colors, checking that each color
component is the same.
@param {Array<number>} rgb1 Color represented by a 3-element array with red,
    green, and blue values respectively, in the range [0, 255].
@param {Array<number>} rgb2 Color represented by a 3-element array with red,
    green, and blue values respectively, in the range [0, 255].
@return {boolean} True if the colors are the same, false otherwise.