RGB color recognition

It would be useful to have a command that activates a lens that recognizes the RGB code of a color so. as to color so as to color an object with for example color as a part of the background without using other apps to know the color code.