I observed some trends as follows:-
- $\ce{PbCl2}$ white and $\ce{PbI2}$ yellow
- $\ce{SnCl2}$ white, $\ce{SnCl4}$ red and $\ce{SnI4}$ black
- $\ce{AgCl}$ white, $\ce{AgI}$, $\ce{AgBr}$ and $\ce{Ag2CO3}$ yellow
In all these cases as the size of anion increases ( polarisability increases) or charge on cation increases (polarising power increases) colour exhibited becomes darker.. How does increasing covalent character affect this? Or is there any other reason?