1
$\begingroup$

I try changing the color for the Input fields. By going to Format >> Text Color >> Orange the color stays to the default value of blue?? For any other field, this works as expected, however. This also seems to be the only reluctant one, since changing, say, the background color works fine?

$\endgroup$
  • $\begingroup$ Style[InputField[1234], FontColor -> Red]. Is this what you are after? $\endgroup$ – Albert Retey Mar 14 '19 at 11:43
  • $\begingroup$ @AlbertRetey Well, maybe I misunderstood what Input fields are, but I assume that they are the "usual" Mathematica codes at least (obtained by simply starting typing in Mathematica or through Alt+9). when I try changing the color of the text from its default blue, nothing happens. $\endgroup$ – Patrick.B Mar 14 '19 at 12:08
  • 1
    $\begingroup$ Patrick, use Preferences under Edit menu; and select the color you want under Appearance >> SyntaxColoring >> Other. $\endgroup$ – kglr Mar 14 '19 at 12:30
  • $\begingroup$ That is nice. Do these changes only affect the local notebook? Is there a way to implement this in a stylesheet? $\endgroup$ – Patrick.B Mar 14 '19 at 12:33
1
$\begingroup$

If you want to change AutoStypeOptions in a style sheet, you can add:

Cell[StyleData["Input"],
    AutoStyleOptions->{"UndefinedSymbolStyle" -> {FontColor -> RGBColor[1., 0., 0.]}}
]

to the style sheet, which will cause all undefined symbols to be colored red. Alternatively, you could turn off auto styles, in which case your format change will take affect:

Cell[StyleData["Input"],
    ShowAutoStyles->False
]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.