Ask Your Question

Revision history [back]

New Sage user here. The blue-on-black color scheme also bothered me. Thought I should provide more information.

Based on what I read here, I tried %colors:

sage: %colors

and got

UsageError: %colors: you must specify a color scheme. See '%colors?'

So I tried %colors?

sage: %colors?                                                                                 
Docstring:
Switch color scheme for prompts, info system and exception handlers.

   Currently implemented schemes: NoColor, Linux, LightBG.

   Color scheme names are not case-sensitive.

   To get a plain black and white terminal:

      %colors nocolor
File:      ~/<decorator-gen-35>

Great, we can set a color scheme in Sage like this:

%colors Linux

If you want this to run every time you use Sage, add that command to your init.sage file.

Because I am on Linux, I created init.sage in the .sage directory in my user home: $HOME/.sage/init.sage

Read more in the Sage manual section "Sage startup scripts."


Also note that there might be more color schemes than those listed under %colors? ...

I misspelled the color scheme argument to %colors and noticed the following in the resulting "Unrecognized color scheme" error output:

Valid schemes: ['NoColor', 'Linux', 'LightBG', 'Neutral', '']

So "Neutral" is another valid option, despite being unmentioned by %colors?. Hope this helps other newbies!