Today we are used to the White Ensign being flown by all ships of the Royal Navy. However in Nelson's Day a different system was in use.
The Navy was divided into three squadrons Red, White and Blue in order of seniority. Admirals were appointed to these squadrons and therefore their rank and squadron split the seniority into 9 bands with ‘Admiral of the Fleet' forming a tenth senior to all others.
Seniority was therefore:
1. Admiral of the Fleet,
2. Admiral of the Red Squadron (Rank introduced in 1805 after Trafalgar)
3. Admiral of the White Squadron
4. Admiral of the Blue Squadron
5. Vice-Admiral of the Red Squadron
6. Vice-Admiral of the White Squadron
7. Vice-Admiral of the Blue Squadron
8. Rear-Admiral of the Red Squadron
9. Rear-Admiral of the White Squadron
10. Rear-Admiral of the Blue Squadron
Admirals without an appointment were colloquially referred to as Yellow Admirals.
Ships of the Royal Navy flew the Ensign that coincided with the squadron of their commanding officer.