Self-assembled nanoparticles of functional copolymers for photonic applications