Hello Simon,
I do not really understabd how you want to generate the graph with the differents RGB value.
Do you want to use the min, the max and the mean of each RGB values
How do you want to use the dependency.
And did you try with an intensity graph?
Best regards
Nick_CH