Measurement of density

Hi…
Is it possible to determine the density of samples qualitatively using colour gradient? That colour intensity can be used for comparing density between samples.

Thank you…