That’s a good question! I think the pH scale is colour-coded to look like the rainbow because it’s an easy way of distinguishing between gradations of pH. Rainbows are a natural phenomenon, and we’ve known about them for much longer than the pH scale. So in that sense, the rainbow definitely came first!
Comments