Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Solarized color scheme for results and viewer windows

    In Windows, Stata stores color scheme details in the Registry.

    In Stata 16 I set up my results and viewer windows to use custom colors based on Ethan Schoonover's Solarized schemes (https://ethanschoonover.com/solarized/). As I was moving them over to Stata 17 I exported the relevant registry keys, updated them for Stata 17, and imported them back into the registry. I present the registry file here in case anyone else wants to implement these colors on their Windows Stata.

    After saving the file Registry-Stata17-SolarizedColors.reg, double-click it to import it into your registry. Windows will warn you that bad things can happen when you import thing to the registry; if you agree, the keys will be imported. Then the "Custom 1" color scheme will be Solarized Dark; and "Custom 2" will be Solarized Light.

    Here's what the two schemes look like:

    Click image for larger version

Name:	solarizedLight.jpg
Views:	1
Size:	32.1 KB
ID:	1608717

    Click image for larger version

Name:	solarizedDark.jpg
Views:	1
Size:	27.5 KB
ID:	1608718


    Code:
    ; BEGIN Registry-Stata17-SolarizedColors.reg ===================================
    Windows Registry Editor Version 5.00
    
    ; Windows 10 registry settings to set Solarized color scheme for Stata Results and Viewer windows
    ; Based on Ethan Schoonover's Solarized schemes https://ethanschoonover.com/solarized/
    ; Created by Nicholas Winter ([email protected]; https://www.nicholasjgwinter.com/)
    ; 
    ; Custom 1 = Solarized Dark
    ;                       -R- -G- -B-
    ;    Results    Base1   147 161 161
    ;    Standard   Base00  101 123 131 
    ;    Error      Red     220  50  47
    ;    Input      Base2   238 232 213
    ;    Link       Blue     38 139 210
    ;    Hilite     Cyan     42 161 152 Bold
    ;    Background Base03    0  43  54
    
    ; Custom 2 = Solarized Light
    ;                       -R- -G- -B-
    ;    Results    Base03    0  43  54
    ;    Standard   Base01   88 110 117
    ;    Error      Red     220  50  47
    ;    Input      Base03    0  43  54 Bold
    ;    Link       Blue     38 139 210
    ;    Hilite     Green   133 153   0 Bold
    ;    Background Base3   243 246 227
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Results_1]
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Results_1\pen_blue]
    @="54,161,131,255,47,213,210,152"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Results_1\pen_bold]
    @="0,0,0,0,0,0,0,1"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Results_1\pen_green]
    @="43,161,123,255,50,232,139,161"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Results_1\pen_red]
    @="0,147,101,0,220,238,38,42"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Results_1\pen_ul]
    @="0,0,0,0,0,0,0,0"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Viewer_1]
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Viewer_1\pen_blue]
    @="54,161,131,255,47,213,210,152"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Viewer_1\pen_bold]
    @="0,0,0,0,0,0,0,1"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Viewer_1\pen_green]
    @="43,161,123,255,50,232,139,161"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Viewer_1\pen_red]
    @="0,147,101,0,220,238,38,42"
    
    [HKEY_CURRENT_USER\Software\Stata\Stata17\Viewer_1\pen_ul]
    @="0,0,0,0,0,0,0,0"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Results_2]
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Results_2\pen_blue]
    @="227,54,117,255,47,54,210,0"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Results_2\pen_bold]
    @="0,0,0,0,0,1,0,1"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Results_2\pen_green]
    @="246,43,110,255,50,43,139,153"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Results_2\pen_red]
    @="253,0,88,0,220,0,38,133"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Results_2\pen_ul]
    @="0,0,0,0,0,0,0,0"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Viewer_2]
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Viewer_2\pen_blue]
    @="227,54,117,255,47,54,210,0"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Viewer_2\pen_bold]
    @="0,0,0,0,0,1,0,1"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Viewer_2\pen_green]
    @="246,43,110,255,50,43,139,153"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Viewer_2\pen_red]
    @="253,0,88,0,220,0,38,133"
    
    [HKEY_CURRENT_USER\SOFTWARE\Stata\Stata17\Viewer_2\pen_ul]
    @="0,0,0,0,0,0,0,0"
    
    ; END Registry-Stata17-SolarizedColors.reg ===================================

  • #2
    Hello Nicholas,

    thanks for that post. Could you please clarify when the modified settings take effect? Immediately? Or on restart of Stata? Or after reboot?

    Thank you, Sergiy

    Comment


    • #3
      Ah, good question. I'm guessing that Stata reads the registry stuff when it starts up, so my advice is to exit Stata, apply the registry changes, then open up Stata again. No need for reboot.

      That will change the color associated with the "Custom 1" and "Custom 2" color schemes. To actually apply one of them to the Results and/or Viewer windows: Select "Edit-Preferences-General Prefernces..." from the menu, or right-click in the results window and click "Preferences..."

      Then in that dialog, select "Results" or "Viewer", then choose "Custom 1" or "Custom 2" from the "Color scheme" drop-down. Then repeat for the other (Viewer/Results) if you want, then click "OK"

      Comment

      Working...
      X