I want to set different background colors for various cell styles (e.g. Section, Text), so that whenever I choose a specific style for some cell in the notebook, it automatically gets colored accordingly. Is this possible to do via evaluating a single simple command inside the notebook?
I've tried, for example, Cell[StyleData["Text"], Background -> Gray]
, but it doesn't work at all. Is there a way to use SetOptions for this?
cell background color
. $\endgroup$SetOptions[#, Background -> Blue] & /@ Cells[CellStyle -> "Section"]
, but it needs to be evaluated every time the new Section cell is created. $\endgroup$private stylesheet
to accomplish this, because it appears that defined styles from the Default stylesheet, when being entered, override your command,SetOptions[#, Background -> Gray] & /@ Cells[EvaluationNotebook[], CellStyle -> "Text"]
. Only after they are entered into your Notebook does your command apply when executed later. Warning: I am no expert on this topic. $\endgroup$