If you put a secondary-only dye in your chestpiece and then unify colors, all the other pieces of your armor get reverted to their original primary colors and receive only the secondary dye color.
Without dyes, using regular unify color:
With a medium-gray secondary dye module:
The primary color from the chestpiece should still transfer even though it is not part of a dye. Dye modules are actually reducing the capabilities of the unify colors function.