We use confocal laser scanning microscopy to measure interactions in colloidal suspensions. By inverting the radial distribution function, determined by tracking the particle coordinates, we obtain the effective interaction between the colloidal particles. Although this method can be applied to arbitrary colloidal interactions, here we demonstrate its efficacy with two well-known systems for which accurate theories are available: a colloid-polymer mixture and binary hard spheres. The high sensitivity of this method allows for the precise determination of complex interactions, as exemplified, for example, by the accurate resolution of the oscillatory effective potential of the binary hard sphere system. We argue that the method is particularly well suited for the determination of attractive forces.