When you walk up to a legendary it will not appear shiny so you have to interact with it to determine if it is shiny or not. If possible, save your game in front of the legendary and soft reset until the legendary until it is shiny although this may take a while. If you did not already know, the chances of a pokemon being shiny is 1/8192 so it will take a while and a lot of soft resets.