3

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.

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

1 Answers1

2

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]
    }
   ]
  ]
 ]
Kuba
  • 136,707
  • 13
  • 279
  • 740
  • Comments are not for extended discussion; this conversation has been moved to chat. – Kuba Dec 26 '18 at 08:33
  • 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. – nonreligious Dec 26 '18 at 20:57