We describe a microfluidic system that enables direct visualization and measurement of diffusiophoretic migration of colloids in response to imposed solution gradients. Such measurements have proven difficult or impossible in macroscopic systems due to difficulties in establishing solution gradients that are sufficiently strong yet hydrodynamically stable. We validate the system with measurements of the concentration-dependent diffusiophoretic mobility of polystyrene colloids in NaCl gradients, confirming that diffusiophoretic migration velocities are proportional to gradients in the logarithm of electrolyte concentration. We then perform the first direct measurement of the concentration-dependent "solvophoretic" mobility of colloids in ethanol-water gradients, whose dependence on concentration and gradient strength was not known either theoretically or experimentally, but which our measurements reveal to be proportional to the gradient in the logarithm of ethanol mole fraction. Finally, we examine solvophoretic migration under a variety of qualitatively distinct chemical gradients, including solvents that are miscible or have finite solubility with water, an electrolyte for which diffusiophoresis proceeds down concentration gradients (unlike for most electrolytes), and a nonelectrolyte (sugar). Our technique enables the direct characterization of diffusiophoretic mobilities of various colloids under various solvent and solute gradients, analogous to the electrophoretic ζ-potential measurements that are routinely used to characterize suspensions. We anticipate that such measurements will provide the feedback required to test and develop theories for solvophoretic and diffusiophoretic migration and ultimately to the conceptual design and engineering of particles that respond in a desired way to their chemical environments.