The slight deviation in color is caused by dithering. If you want to save accurate values for non-color data, then you have to:
Set Dither to zero in Output Properties > Post Processing
Use one of the following options: Set the View Transform to Raw, disable Save As Render in the file browser or save as OpenEXR to by pass the color management. The latter ...
You can use drivers on the Pos value.
All you need is a driving value.
Let's make the drivers from the group input. First enter the group node, select the Group Input node. In the sidebar (open with N). In the Node tab, you can add Inputs, name them and set their default/minimum/maximum values. I added two new inputs:
Get out of the node, right click one ...
You can make your own transmissive water material and tweak settings,
But i prefer to install an free addon which is included in blender, it's called cycles material library or something like that.
There are many water materials available in it.
You can find whatever that suits your needs.
You would not need to change anything if you are using cycles but ...
It will look live paint if you are using Eevee. You need to use Cycles. Here is the material that should work(Glass BSDF). Adjust the color to your needs. Also, try adjusting roughness(Lower roughness makes it clearer).
Create a material that applies your color ramp depending on the vertex color. That way we dont need to create a separate material for each sphere and can easily manipulate the color ramp in one material and all spheres will change accordingly.
Create the spheres and set the color of all there vertices to your Q-Value
mat = bpy....