There are a few ways to change the text color of a TextField. One way is to set the color property of the TextField to a Color object. For example, the following code sets the text color to red:
TextField textField = new TextField();
textField.setColor(Color.red);
Another way to change the text color is to use CSS. To do this, add a CSS rule to the stylesheet that sets the color property of the TextField. For example, the following CSS rule sets the text color to red:
TextField {
-fx-text-fill: red;
}