now calculate max l, p, and r positions and overlay on rgb