function colorDistance(rgb1, rgb2) {
  const [r1, g1, b1] = rgb1;
  const [r2, g2, b2] = rgb2;
  return Math.sqrt(
    Math.pow(r1 - r2, 2) + Math.pow(g1 - g2, 2) + Math.pow(b1 - b2, 2),
  );
}
Calculates the distance between two RGB colors.
@param {number[]} rgb1 - The first RGB color.
@param {number[]} rgb2 - The second RGB color.
@returns {number} The distance between the colors.