Welcome, Erum. I'm not sure if you are asking simply how to change the color of the type or of the background, or something more complicated. The code here creates initially a screen with dull white background, and types different lines with different colors on that screen.
Then, it creates separate background colors, for each line of type.
You can play around with the effects in many ways. But for example, when the pH comes out with a certain value, to can create an IF statement that sets the type or the background colors, to different values?
SCREEN _NEWIMAGE(120, 43, 0)
COLOR 7, 7
CLS
COLOR 0, 7
PRINT "This is black."
COLOR 4, 7
PRINT "This is red."
COLOR 1, 7
PRINT "This is blue."
COLOR 14, 7
PRINT "This is bright yellow."
PRINT
COLOR 15, 0
PRINT "This has bright white type over a black background."
COLOR 7, 0
PRINT "This has dull white type on a black bachground."
COLOR 1, 4
PRINT "This has blue type on a red background."
END