> When a player, having the move, plays a pawn to the rank furthest from its starting position, he must exchange that pawn as part of the same move for a new queen, rook, bishop or knight of the same colour on the intended square of arrival.
> promotion: 3.7e. Where a pawn reaches the eighth rank and is replaced by a new queen, rook, bishop or knight of the same colour.
"The broad language of Law XIII also appears to allow promotion to any piece of either color. This led to the whimsical endgame study diagrammed at right. White is to play and checkmate in one move."
Sarratt in his Treatise on the Game of Chess (1808) says:
"When a player has pushed a Pawn to Queen, he is at liberty to make a second Queen, a third Rook, or any other piece which he may deem more useful for his attack or defense".
While this doesn't explicitly say that he must promote to a piece of the same color, it implies it. After all if the piece could be promoted to either color it would make sense to say a third queen or a fifth rook rather than a second or third.
That doesn't really imply much. Having a fifth rook does not correlate at all to having a piece of the same or opposite colour. Regardless, based off that rule, a piece of the opposing colour would be defined by "any other peice [sic] which he may deem more useful for his attack" in that play, so it sounds perfectly legal to me.
If you arrange your game just right, you can legally have up to ten rooks (or bishops or knights, or nine queens) of the same color on the board at once. (This will probably not be possible without the cooperation of the other player.)
> When a player, having the move, plays a pawn to the rank furthest from its starting position, he must exchange that pawn as part of the same move for a new queen, rook, bishop or knight of the same colour on the intended square of arrival.
> promotion: 3.7e. Where a pawn reaches the eighth rank and is replaced by a new queen, rook, bishop or knight of the same colour.
https://www.fide.com/fide/handbook.html?id=171&view=article