The exact expression depends on how you want it to respond, but here’s an example. You would add a slider control to the text layer and apply this expression to the fill color:
offset = effect(“Slider Control”)(“Slider”); // your offset value here
maxOffset = 100; // offset where blue is maximum
minBlue = 0;
maxBlue = 1.0;
blue = linear(offset,0,maxOffset,minBlue,maxBlue);
red = value[0];
green = value[1];
[red,green,blue,1]
Adjusting the slider from 0 to 100 will cause the blue component of the fill color to go from 0 (no blue) to 1.0 (max blue).
Dan