In Harry Potter and the Philosopher's Stone, during the sorting ceremony, all the new students were wearing plain black robes with black ties. These were bought in Diagon Alley prior to their arrival at Hogwarts.
However, once classes begin, their robes are of course showing the colours of the houses they have been sorted into, complete with new ties and patches. Is it mentioned how this change occurs? Or are we simply expected to assume that it simply happened via some unspecified magic "off-screen" / "off-page" (in the case of the book)?