Canvas is changing pixel colours by itself

I was trying to set pixel color in canvas according to my restrict rules but unfortunately canvas is changing colours codes by itself.
I prepared a simple AIA that sets and immediately reads color code of the pixel (showing related codes and RGB). You can see that those colours are different (practically always there is a difference in at least one RGB code).
I was not able to understand why and what is the logic of those changes and I'll be very thankful for any workaround.

Prova1 (1).aia (4.1 KB)

Try a simpler code.

It was tested once. The result of the tests was that the success of reading the colors of all pixels depends on the screen resolution settings on the phone. Try changing the resolution and doing some tests with each setting.

On OnePlus 9 and Samsung 22 the change of resolution is not changing the number of errors.
I was trying to change also the brightness and colour improvement but there isn't any effect.
Any other idea?

Unfortunately your simple code is working only for simple colours. Please try more complex colours like in my example and you will see that there are errors with canvas colour setting

Finally i understood that Canvas is changing pixel colours if you are setting a canvas Paintcolour using alfa component not equal to 255.
If you are setting a canvas colour using only RGB

than Canvas.GetPixelColour is returning the same colour value BUT if you are using also alfa component

than Canvas.GetPixelColour is returning wrong(modified) colour.
p.s screen resolution, brightness and etc. are not influencing this problem

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.