From the Super Mario Wiki
Retrieved from "https://www.mariowiki.com/index.php?title=Color_Switch&oldid=2242793"
They come in red, yellow, or blue, and require Mario or Mini Mario to jump on top to activate. They typically have the effect of enabling corresponding Color Blocks, as well as color-coded platforms, ladders, or horizontal or vertical gates. This also disables the other colors, although Color Switches may have secondary functions on other obstacles on the screen, such as Phantom Guys.
In Mario vs. Donkey Kong, they appeared like rounded buttons. In Mario vs. Donkey Kong 2: March of the Minis they have flat tops, a design which has stuck in subsequent titles. They use different sound effects in Mario vs. Donkey Kong and Mario vs. Donkey Kong: Tipping Stars.