>I did find one adjustment so far. The last line should be:
>
>
> pair2Y = rgb(pair2Yred, pair2Ygreen , pair2Yblue )
>
>
>This fixes that line but still results in another color than the one expected.
>
>I am continuing to verify the code.
>
>Let me know if you find what it is in the meantime.
I corrected those also - don't know whether it will make much of a difference
pair2Yred = mod(m.pair2Xred + (pair1Yred - pair1Xred), 256)
pair2Ygreen = mod(m.pair2Xgreen + (pair1Ygreen - pair1Xgreen), 256)
pair2Yblue = mod(m.pair2Xblue + (pair1Yblue - pair1Xblue), 256)
Gregory