How to get the RGB value in pic

How to get the explicit RGB value in input pic?
it means I can compare the values in different
pixels