but the spectrum itself was defined long, long before the units were known

But you could see that there were at least six different colors. The rainbow is a spectrum and you can't pinpoint exactly when orange starts and red ends, but red is definitely not blue, orange is not green. The obvious colors were the units, I guess.

[–] Lipsy #bornnotworn 4 points Edited

Those are "categorical values", not units. They're not rlly appropriate here, because visible light is a spectrum—there are infinitely many colors blending together.
Categorical values are discrete and can be counted with whole numbers, like the grade school formulation of the rainbow—which is basically just arbitrary, and, notably, not the same from one language to another (e.g. many Asian languages use the same word for blue and green. Other colors, like violet and orange, are named for fruits or flowers and don't correspond well between languages; Chinese people call hot pink "rose red", but have a different word for baby pink).

Units are numerical; the very name itself tells you in Latin that the unit represents exactly 1 of whatever thing. (The "one" in any romance language—un, une, uno, una, etc—is pretty visible in there too.)