Strange mapping of float shader color values to uchar values in a read buffer

I knew that a range of float color value in a shader [0…1] is mapped into range of [0…255] in UCHAR buffer.

According to this, I was expecting for steps of size of 1/255 in shader color values for each change in UCHAR buffer.

But the results were surprisingly different. Here is for the first two steps:

Red float value in Shader -> UCHAR value in a read Buffer

0.000000 -> 0

0.002197 -> 0

0.002198 -> 1

0.006102 -> 1

0.006105 -> 2

The first two steps are around 0.002197 and 0.006102 which are different than the expected steps: 0.00392 and 0.00784.

So what is the mapping formula ?