Digital refractometers use an LED light that passes through a prism in contact with the sample.
An image sensor then measures the degree to which the light changes direction (refracts) to determine the concentration of the solution.
They measure the refractive index, which is a measure of how light behaves as it passes through a sample, and this can be used to determine the sample's concentration and density.