Go through Chocolate Island 3 and get to the end, but don't go through the goal. As in the Die when you're winning glitch, you should be big Mario and on Yoshi. It helps to be cape Mario and have a blue Yoshi so you can go through the level pretty quickly by flying through. Now, stand below the first goal that stands at the top of the screen. Walk to the left a bit so that there is land above you but it's still before the goal. Jump up with your Yoshi and at the peak of his jump, press A to hop off of him. If you time the jumping correctly, you will get enough height and be up next to the goal. Now, walk through the goal. Mario will be in the top of the screen and the game will have trouble focusing on anything for its normal zoom-out sequence in the end. So, the game will get slightly messed up and the colors in the overworld will become messed up. You can go into the Forest of Illusion to clear up the black areas around the Mario at the top, but the colors will remain messed up. However, going into Vanilla Dome, other levels, and probably other separate areas will return everything to normal.
A Youtube video of this glitch can be seen here.