How can you have multi-colored toothpaste?

This question has been asked by many people that how multi-colored toothpaste is produced and why the colors are not combined.

To produce multi-colored toothpaste, the device is equipped with a separate piston cylinder for each color, for example, two separate pumps are needed for two-colored toothpaste, and the secret of not combining these two substances in the tube is having the same viscosity.