The first oranges ever imported from south-east Asia were green in color. Oranges are grown in warmer parts of the world such as Vietnam and Thailand stay green throughout their lifetime.
The fruit came before the color. The word "orange" derives from the Arabic naranj and arrived in English as "narange" in the 14th century, gradually losing the initial "n". Orange was first used as the name for a color in 1542.
Oranges are unknown in the wild. They are a hybrid of tangerines and the pomelo or "Chinese grapefruit" (which is pale green or yellow) and were first cultivated in south-east Asia. They weren't orange, but green, and Vietnamese oranges and Thai tangerines are still bright green on the outside and orange inside.
So how have they ended up giving their name to a color? It's because oranges are a subtropical, not tropical fruit. The color of an orange depends on where it grows. In more temperate climes, its green skin turns orange when the weather cools; but in countries where it's always hot, the chlorophyll is preserved and the fruit stays green.
You can't tell the ripeness of orange by its color, no matter where it's from. If an orange is unpicked, it can stay on the tree until the next season, during which time fluctuations in temperature can make it turn from green to orange and back to green again without the quality or flavor being affected.