The weld forms where the two parts touch, below the surface.
In transmission welding, the two parts are clamped together. A laser beam passes through the upper part, which is transparent to that wavelength, and is absorbed by the lower part at the joint. The surface of the lower part melts, heat passes into the upper part where they touch, and the clamp pressure closes the gap as both sides melt and fuse.
The upper part does not have to look clear. It only has to let near infrared light through, and many black resins are made to do exactly that. So a black lid can be welded to a black base, with the difference sitting in the additives nobody can see.