From the Super Mario Wiki, the Mario encyclopedia
A treasure button, also referred to as a Button, Ⓦ logo button or Ⓦ Button, is an object found in Wario World. Ground Pounding, punching or throwing an enemy at the treasure button will make a treasure chest containing one of Wario's Treasures appear on a panel of the same color somewhere else in the level.
In each level, there are eight differently colored buttons: red, yellow, chartreuse, green, cyan, blue, purple, and pink.
When Wario finds that treasure, the treasure spot and the button turn gray.