Ships flew the colour of ensign corresponding to the squadron to which they were attached, which was in turn determined by the seniority of the admiral under whose command the ship sailed (a rear admiral of the red was senior to a rear admiral of the white).