3
$\begingroup$

I like using the ReverseColor stylesheet in Mathematica as I find it easier on the eyes when staring at at notebook for long periods of time.

However, the one bugbear I have is that some of the default choices for colors mean that it is sometimes difficult to read text. Most notably, when the output of a computation is large the grey text on light blue background is just terrible - see attached screenshot.

Does anyone know what to edit in the stylesheet to fix this (and how to access it?) Otherwise, is there a dark/reverse color stylesheet around that is better to use?

Thanks in advance.

$\endgroup$
  • 1
    $\begingroup$ does SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[{Cell[StyleData[StyleDefinitions -> "ReverseColor.nb"]], Cell[StyleData["OutputSizeLimit"], Background -> Black]}]] give ehat you need? $\endgroup$ – kglr Dec 19 '18 at 18:13
  • $\begingroup$ Yes! Perfect... now I need to work out how to find this in the Option Inspector to fix this globally. Thanks very much! $\endgroup$ – nonreligious Dec 19 '18 at 19:04
2
$\begingroup$

Closely related: How to customize the package editor interface?

You can create a ReverseColor.nb in \$UserBaseDirectory/SystemFiles/FrontEnd/Stylesheets, customize it and point it to ReverseColor.nb from $InstallationDirectory.

$path = FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", 
   "StyleSheets", "ReverseColor.nb"}]

If[
  FileExistsQ @ $path
, SystemOpen @ $path (*if it exists edit it manually*)
, If[
    Not @ DirectoryQ @ #
  , CreateDirectory[#, CreateIntermediateDirectories -> True]
  ] & @ DirectoryName @ $path
; Export[
$path
  , Notebook[{
      Cell[
     StyleData[
      StyleDefinitions -> 
       FrontEnd`FileName[{$InstallationDirectory, "SystemFiles", 
         "FrontEnd", "StyleSheets"}, "ReverseColor.nb"]]],
    Cell[StyleData["OutputSizeLimit"], Background -> Black]
    }
   ]
  ]
 ]
$\endgroup$
  • $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$ – Kuba Dec 26 '18 at 8:33
  • $\begingroup$ Thanks to @Kuba for the solution - to avoid the stupid mistake I was making, copy the code above and paste it in a new notebook, this will automatically create the ReverseColor.nb file in $UserBaseDirector/SystemFiles/FrontEnd/StyleSheets. Then restart Mathematica to get to see the changes. $\endgroup$ – nonreligious Dec 26 '18 at 20:57

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.