Can you at least try to do something before asking?
This question really makes no sense, the answer should pop up in your mind. If you have a "Palette viewer" and you can activate it whenever you like, can't you activate it, while in the pokegear, pokedex, on the map, etc.
Hiro sprite = Palette viewer when Hiro is in view, and look on the right side of the palettes.
So basically it's the same process as anything else...