107

I've just updated Spyder to version 3.1 and I'm having trouble changing the colour scheme to dark. I've been able to change the Python and iPython console's to dark but the option to change the editor to dark is not where I would expect it to be. Could anybody tell me how to change the colour scheme of the Spyder 3.1 editor to dark?

CiaranWelsh
  • 7,014
  • 10
  • 53
  • 106

17 Answers17

214

If you're using Spyder 3, please go to

Tools > Preferences > Syntax Coloring

and select there the dark theme you want to use.

In Spyder 4, a dark theme is used by default. But if you want to select a different theme you can go to

Tools > Preferences > Appearance > Syntax highlighting theme

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
  • 3
    Is it possible to apply a dark background to the "Variable Explorer"? I might be missing something obvious, but I couldn't find a way to change its color scheme. Same question for the "Help" and "File Explorer" windows. – Rational-IM Oct 27 '19 at 13:40
  • @An_old_dude, that's already implemented and it'll part of Spyder 4, to be released in November 2019. – Carlos Cordoba Oct 27 '19 at 18:17
  • 2
    Thank you @Carlos Cordoba for the quick response. This will be a fantastic addition to Spyder (the best IDE around, IMHO). – Rational-IM Oct 27 '19 at 20:41
  • 2
    This is really messed up. Spyder4 you can select themes but that only affects the syntax highlighting areas which is only about 2/3 of the entire UI so 1/3 of the entire app i.e. explorer, toolbars etc are completely different than the theme. When we change a theme why doesn't the entire UI change like VSCode, PyCharm and all other IDEs? There's literally no point in selecting themes if it's going to be this way. – TokyoToo May 30 '20 at 13:34
  • 1
    this answer is wrong : question was about the option to change the editor (file explorer, variable explorer etc) to dark is not where I would expect it to be. I cannot get variable/file explorer to dark as everybody says – pippo1980 Sep 10 '21 at 14:17
  • @pippo1980, you're probably using Spyder 3 (which is very old). Please update to Spyder 4 or 5 to get a completely dark interface. – Carlos Cordoba Sep 10 '21 at 20:18
  • @CarlosCordoba I am on 5.0.1 – pippo1980 Sep 10 '21 at 20:37
27
Tools->Preferences->Syntax coloring->Scheme changed to "Spyder Dark"
nick
  • 1,090
  • 1
  • 11
  • 24
Allen
  • 271
  • 3
  • 2
9

For Spyder 2.3 which is still installed via apt-get on linux, you change the theme via

Tools > Preferences > Editor > Syntax Color 

The

Tools > Preferences > Syntax Coloring

only shows options for adjusting the different themes, but not actually applying a different theme. Spyder 3.x uses the second option via Syntax Color.

marts
  • 658
  • 1
  • 10
  • 15
7

If you are using MacBook Pro (OS X) follow the following steps:

python > Preference > Syntax coloring

enter image description here

enter image description here

ewalel
  • 1,932
  • 20
  • 25
5

In Spyder 2.3.8 on Ubuntu, I found several settings to do this - each one for a different part of the window... Seems that you can't make all areas dark though.

Editor

Inspector

Console

History

IPython

And the final result looks like this:

Final

Michael Litvin
  • 3,976
  • 1
  • 34
  • 40
  • 1
    I'm the Spyder maintainer and your answer only applies to a very, very old version of Spyder (more than 3 years old). Since you didn't clarify to what Spyder version it applies, I think you have two choices: 1. Update your answer accordingly; 2) Remove your answer. – Carlos Cordoba Oct 22 '18 at 15:31
  • Weird, I just installed it last week (using `sudo apt-get install spyder`). Didn't use `spyder3` because it didn't seem to support Python 2.7 (or does it?). Didn't use conda because I didn't want the extra python to interfere with what I already have installed. Anyways, I will update the exact version tomorrow when I get to my computer. – Michael Litvin Oct 22 '18 at 18:42
  • This is a regular problem with Linux distros: their LTS or stable versions come with very outdated packages (like it's the case here). At the very least, please edit your answer to mention what Spyder version you're using. – Carlos Cordoba Oct 22 '18 at 21:19
  • Done. Any way I could update Spyder, without conda and with support for Python 2.7? – Michael Litvin Oct 23 '18 at 08:51
  • You have two options: a) Update your distro; and b) Use a virtualenv and pip. – Carlos Cordoba Oct 23 '18 at 13:18
  • I am using spyder 3.3.1 on ubuntu and have similar issue: console and editor dark and project explorer and variable explorer light – seanv507 Dec 07 '18 at 14:06
3

I like matching the editor dark scheme to IPython dark scheme. As for IPython, go to

Tools > Preferences > IPython cosole > display tab

and check Dark background.

Restart the kernel. Then look at the colors you get, say, when you import. My spyder2 (python 2.7) uses Anaconda's ipython 5.3.0 and import is pink, the best matching scheme for the editor is Monokai, you choose this in

Tools > Preferences > Syntax coloring

My spyder3, when choosing dark IPython (2.4.1) background prints colors a bit different than Monokai, but if you go to

Tools > Preferences > Syntax coloring  

you go to Monokai tab and tweak the colors a bit. I had to change builtin from lilac to cyan

J...S
  • 5,079
  • 1
  • 20
  • 35
Yuval Harpaz
  • 1,416
  • 1
  • 12
  • 16
2

I tried the option: Tools > Preferences > Syntax coloring > dark spyder is not working.

You should rather use the path: Tools > Preferences > Syntax coloring > spyder then begin modifications as you want your editor to appear

D.Wolf
  • 21
  • 1
2

I think some of the people answering this question don’t actually try to do what they recommend, because there is something wrong with way the Mac OS version handles the windows.

When you choose the new color scheme and click OK, the preferences window looks like it closed, but it is still there behind the main spyder window. You need to switch windows with command ~ or move the main spyder window to expose the preferences window. Then you need to click Apply to get the new color scheme.

SOBrien
  • 21
  • 1
1

@D.Wolf -- if Preferences doesn't appear in the drop-down under Tools, there is also an icon in the toolbar that is a direct path to tools -> Preferences, and the Syntax Coloring is on the left-hand side. See the wrench? Just click that.

1

On mine it's Tools --> Preferences --> Editor and "Syntax Color Scheme" dropdown is at the very bottom of the list.

1

I've seen some people recommending installing aditional software but in my opinion the best way is by using the built-in skins, you can find them at:

Tools > Preferences > Syntax Coloring

Camunatas
  • 123
  • 1
  • 9
1

For Spyder 3: In case you don't find Preferences under Tools > Preferences, thats probably because Preferences is pinned onto your tool bar by default Preferences in Tool Bar

SCF-byter
  • 91
  • 6
0

At First click on preferences(Ctrl+Shift+alt+p) then click the option of syntax coloring and change the scheme to "Monokai".Now apply it and you will get the dark scheme.

0

1.Click Tools
2.Click Preferences
3.Select Syntax Coloring

0

I want to add that you can change the theme of Spyder 3 to a dark on Linux by using:

Qtmodern


Install Qtmodern with pip3

pip3 install --user qtmodern

Open the file:

python-site-packages/spyder/app/mainwindow.py

Import modern style

Find:

# Qt imports

Add:

import qtmodern.styles
import qtmodern.windows

Theme the app

Find method:

def run_spyder(

Add:

#wrapper for custom theme
qtmodern.styles.dark(app)

Theme the window

Find:

main.show()

Replace it with:

##wrapper for dark window theme
mw = qtmodern.windows.ModernWindow(main)
mw.show()
Teoman
  • 109
  • 1
0

In Spyder 4.1, you can change background color from: Tools > Preferences > Appearance > Syntax highlighting scheme

rmswrp
  • 501
  • 5
  • 5
-5

Yes, that's the intuitive answer. Nothing in Spyder is intuitive. Go to Preferences/Editor and select the scheme you want. Then go to Preferences/Syntax Coloring and adjust the colors if you want to. tcebob

tcebob
  • 1
  • 3
    That was the way to do things in Spyder 2.3, but not anymore in Spyder 3. Selecting a new scheme and adjusting the current one are both done in `Preferences > Syntax Coloring` now. – Carlos Cordoba Dec 07 '16 at 16:20