Self assembly of polyelectrolytes for photonic crystal applications