You can only unlock painted items online.
I simply played 5 matches of Standard 3v3 online (the game mode does not matter) and unlocked a Painted Top Hat at the end of the fifth game.
It may take longer for you though since it is down to luck and will unlock at random.
Note: There is apparently a 10 hour weekly limit to earning rewards, if you find you are no longer earning items simply wait until the following week.
* With the last update trading was introduced into the game. You can now receive Painted and Certified items via another player. The achievement has been reported to be rather glitchy when unlocking via trading.
However, according to user MacWhyte after recieving your painted item from a friend, switching profiles at the main menu and then switching back to your profile unlocks the achievement immediately. If not then waiting 24 hours after you received the painted item works as well according to many users.