Hello all! This is my first post to the forum. Please forgive me if there's a better place to put this post. Let me know if you think there's a better place for this post.
I am a PhD student and use SAS a lot. It's not uncommon for me to be on SAS all day. I get migraines easily and spending too much time working in SAS can be a problem for me - the brightness of the screen can trigger my migraines. I've changed the brightness settings on my monitor, which helps, but does not eliminate the problem. Is there some way to change the system color scheme in SAS? I know I can change the color scheme for tables and any charts or graphs that I create. But I'm looking for a way to change the background color for the windows I work in most of the time - the code editor and log windows.
Thanks in advance for any help!
Here's an example for base sas
dm 'log;color note black;
color source blue;
color warning yellow;
color data blue;
color background gray;
wsave;';
note the start and end '
The DM colors are the traditional 16 red, black, blue, cyan, yellow, white, brown, gray magenta pink and such.
the output window has different options
dm 'output;
color data black;
color footn blue;
color header blue;';
dm 'output;
color title blue;
color error white;
color background cyan;
wsave';
The WSAVE places these settings in your SASUSER.PROFILE and shouldn't have to be rerun each session.
The enhanced editor has a separate system for defining colors, use Tools>Options>Enhanced Editor>Appearance to create your style for use.
I you are using the classic editor:
dm 'pgm;
color banner white;
color command white;
color message white;
color mark white reverse;';
dm 'pgm;
color text white;
color nums white;
color background blue;
wsave';
Here's an example for base sas
dm 'log;color note black;
color source blue;
color warning yellow;
color data blue;
color background gray;
wsave;';
note the start and end '
The DM colors are the traditional 16 red, black, blue, cyan, yellow, white, brown, gray magenta pink and such.
the output window has different options
dm 'output;
color data black;
color footn blue;
color header blue;';
dm 'output;
color title blue;
color error white;
color background cyan;
wsave';
The WSAVE places these settings in your SASUSER.PROFILE and shouldn't have to be rerun each session.
The enhanced editor has a separate system for defining colors, use Tools>Options>Enhanced Editor>Appearance to create your style for use.
I you are using the classic editor:
dm 'pgm;
color banner white;
color command white;
color message white;
color mark white reverse;';
dm 'pgm;
color text white;
color nums white;
color background blue;
wsave';
ballardw,
It looks as if you've given me some code to input somewhere to change the color schemes. Where do I input the code?
After seeing your reply to my earlier post I made changes in the Enhanced Editor and I've now got a pretty comfortable color scheme for the code editor. However, the color scheme for the log and output windows are unchanged and still have that glaring white background. It looks as if the code you provide above should address that problem. How can I use it to change my user settings?
Thanks again!
The posted code are statements that you could submit from the Enhanced Editor. They are using the DM statement (Display Manager) to programmatically submit statements that you could have typed one by one on the command line (if you have the command line turned off in the LOG and OUTPUT windows you can use the one on the tool bar. Just copy the statements (starting DM and ending with the trailing semi-colon) to your program window and submit.
As Tom says, execute the code as any program. Change the colors to what you may prefer. The banner, command and message areas probably aren't used as much any more.
For another example look in your SASAUTOS path for the file 'dm609clr.sas'.
I think it's purpose was to reset to the color scheme that SAS 6.09 used. But it serves as a good example of how to issue COLOR commands from a program.
I think in a Microsoft windows it would be dm609clr.sas as that's where I copied the code from. And since that program references windows that are no longer used you can get into trouble trying to run the whole thing. As in Hangs and fails.
Thank you ballardw and Tom! You've both been very helpful. I was able to submit the code you gave me and play around with the color schemes. I found another solution which works better for people with my situation, because it will also solve the same problem with Microsoft Office products, or any other program with a glaring white background. I will explain below in case it might be useful for others who stumble across this thread.
Is there an easy way to restore SAS' color scheme to the default?
The other solution (which works best when the SAS colors are the default colors) is to invert the colors for all programs that are open on your desktop. You can do so by opening the "Magnifier" program (for Windows 7, click on the Windows icon on the bottom left of the screen, enter "Magnifier" in the "search programs and files" box), click on the cog icon in the little Magnifier program window that pops up once you open Magnifier, then click on the "turn on color inversion" box. The colors should now be inverted for all programs when the Magnifier program is open (so minimize it, don't close it). You can open the program and invert the color scheme whenever you feel a little eye fatigue.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.