in this case you can add a slot method and connect it with the OnChange property of the HorizontalSlider. This means, each time you change the position of the slider, your slot method will be called.
Within this slot method, you can implemenet your desired logic to colorize the text (or to do any other things).
var uint8 red = (uint8)HorizontalSlider.CurrentValue;
var uint8 green = 0x00; /* or some other value */
var uint8 blue = 0x00; /* or some other value */
Text.Color = color( red, green, blue, 0xFF );
If you only want to change the color while the user is interacting with the slider, you can use the sliders OnStart and OnEnd slot methods and connect them with two slot methods - one to highlight the text and the other one to restore the previous color.
Does this answer your question?