Vertex color value has weird offset in value when assigned from script
Looking at the blender sources, the colors seem to get rounded.

static void rna_MeshLoopColor_color_set(PointerRNA *ptr, const float *values)
{
  MLoopCol *mlcol = (MLoopCol *)ptr-&gt;data;

  mlcol-&gt;r = round_fl_to_uchar_clamp(values[0] * 255.0f);
  mlcol-&gt;g = round_fl_to_uchar_clamp(values[1] * 255.0f);
  mlcol-&gt;b = round_fl_to_uchar_clamp(values[2] * 255.0f);
  mlcol-&gt;a = round_fl_to_uchar_clamp(values[3] * 255.0f);
}