Thanks, this formula of converting SRGB to RGB works but I had to round it:
color.r = pow(color.r, 2.2)
color.r = round(color.r * 100) / 100.0
but I ended up using this property of the Viewport: keep_3d_linear = true only for the moment I pick the color of the Viewport while the Viewport is covered by the screenshot I took a moment before.
works fine now, but only on iOS, if I do keep_3d_linear = true in PC and pick a color of a pixel it doesn't work the way it should so only on iOS I do keep_3d_linear = true. I wonder if on a mac it is the same as on an iPhone. will check in the future.