You can get a tri-color with anchor light in one assembly. They are two, stacked units in one. There are two-wire versions (they reverse polarity to select the anchor light or the tri-color) and three-wire versions (which usually use two separate switchs).
Note that the tri-color is only legal when you are under sail. When powering, you must use deck-level lights and your steaming light (part-way up the mast).