Pycharm как изменить цветовую схему

I would like to change the background color for the PyCharm source code editor. How can I do that? I am running it under Ubuntu.

I would like to change the background color for the PyCharm source code editor. How can I do that?

I am running it under Ubuntu.

Jean-François Corbett's user avatar

asked May 15, 2016 at 14:47

Fanta's user avatar

4

Providing @Guoliang’s helpful comment as a formal answer, as the accepted answer does not answer the question:

Go to Settings > Editor > Colors & Fonts > General

On the right side, expand Text and select Default text

Modify Background as desired.

answered Dec 2, 2016 at 3:58

davidA's user avatar

davidAdavidA

12k8 gold badges61 silver badges91 bronze badges

0

A shortcut to bring up the style menu is CTRL+` (that’s the backtick key usually under Esc).

It brings up the Switch menu, with options for Color Scheme and Look and Feel.
Switch menus

The Color Scheme setting controls the colors of the main code editor pane. The Look and Feel setting controls the color for the entire interface (including the code editor if the Color Scheme is Default).

answered Jul 27, 2018 at 13:52

Justin's user avatar

JustinJustin

6,5013 gold badges36 silver badges56 bronze badges

Go to File > Settings > Editor > Color Scheme
Under Schemes, select Dracula (it’s a dark background). One can select others as well based on your likings.

answered Jun 19, 2018 at 18:00

Anp's user avatar

1

As a developer, you work with a lot of text resources: the source code in the editor, search results, debugger information, console input and output, and so on. Colors and font styles are used to format this text and help you better understand it at a glance.

PyCharm lets you choose between configurable color schemes that define colors and fonts used in IDE text.

Default color schemes for Python

You can use a predefined color scheme or customize it to your liking. It is also possible to share schemes.

Select a color scheme

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. Use the Scheme list to select a color scheme.

    Select the color scheme

By default, there are the following predefined color schemes:

  • Classic Light: designed for the macOS Light and Windows 10 Light interface themes

  • Darcula: designed for the Darcula interface theme

  • High contrast: designed for the High contrast interface theme (recommended for users with sight deficiency)

  • IntelliJ Light: designed for the IntelliJ Light interface theme

Customize a color scheme

You can customize a predefined color scheme, but it is recommended to create a duplicate for your custom color and font settings:

Duplicate a color scheme

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. Select a color scheme, click the Settings icon, and then click Duplicate.

  3. (Optional) To rename your custom scheme, click the Settings icon and select Rename.

To define color and font settings, open the Editor | Color Scheme page of the IDE settings Ctrl+Alt+S. The settings under are separated into sections. For example, the General section defines basic editor colors, such as the gutter, line numbers, errors, warnings, popups, hints, and so on. The Language Defaults section contains common syntax highlighting settings, which are applied to all supported programming languages by default. In most cases, it is sufficient to configure Language Defaults and make adjustments for specific languages if necessary. To change inherited color settings for an element, clear the Inherit values from checkbox.

Language Defaults section under Color Scheme settings

Define custom font and color settings for Python

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. Select any code element you want to customize and clear the corresponding Inherit values from checkbox to change inherited color settings for this element; then specify your color and font settings.

    For example, you can set a color highlighting for nested functions. From the list of the code elements, select Nested function definitions, clear the Inherit values from checkbox and specify the element foreground and background colors. Click OK to save the changes.

    Highlight nested functions

Semantic highlighting

By default, the color scheme defines syntax highlighting for reserved words and other symbols in your source code: operators, keywords, suggestions, string literals, and so on. If you have a function or method with many parameters and local variables, it may be hard to distinguish them from one another at a glance. You can use semantic highlighting to assign a different color to each parameter and local variable.

Enable semantic highlighting

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. Select the Semantic highlighting checkbox and customize the color ranges if necessary.

Semantic highlighting

This will enable semantic highlighting for all languages that inherit this setting from Language Defaults. To enable it for a specific language instead (for example, Python) go to the Editor | Color Scheme | Python | Semantic highlighting page of the IDE settings Ctrl+Alt+S, clear the Inherit values from checkbox, and select the Semantic highlighting checkbox.

If you are used to a specific color scheme, you can export it from one installation and import it to another one. You can also share color schemes with other developers.

Export a color scheme as XML

PyCharm can save your color scheme settings as an XML file with the .icls extension. You can then import the file to another installation.

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. From the Scheme list, select a color scheme, click The Settings icon, then click Export and select IntelliJ IDEA color scheme (.icls).

  3. Specify the name and location of the file and save it.

Export a color scheme as a plugin

The plugin can be uploaded to the plugin repository for others to install. This format has several benefits over an XML file, including metadata, feedback, download statistics, and versioning (when you upload a new version of the plugin, users will be notified about it).

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. From the Scheme list, select a color scheme, click The Settings icon, then click Export and select Color scheme plugin .jar.

  3. In the Create Color Scheme Plugin dialog, specify the version details and vendor information. Then click OK.

Import a color scheme

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. From the Scheme list, select a color scheme, click The Settings icon, then click Import Scheme.

Fonts

To customize the default font used in the editor, open the Editor | Font page of the IDE settings Ctrl+Alt+S. This font is used and inherited in all color schemes by default. For more information, see Font.

PyCharm can use any font that’s available in your operating system. To add another font to the list, either install it in the operating system or into the Java runtime that is used to run PyCharm.

Customize the color scheme font

You can set a different font for your current scheme.

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. Select the Use color scheme font instead of the default checkbox.

Customize the console font

By default, text in the console uses the same font as the color scheme. To use a different font in the console:

  1. Press Ctrl+Alt+S to open the IDE settings and select .

  2. Select the Use console font instead of the default checkbox.

Productivity tips

See the color scheme settings for the current symbol

  • Put the caret at the necessary symbol, press Ctrl+Shift+A, find the Jump to Colors and Fonts action, and execute it.

This will open the relevant color scheme settings for the symbol under the caret.

See which fonts are currently used in the editor

  • Press Ctrl+Shift+A, find the Show Fonts Used by Editor action, and execute it.

This will open the Fonts Used in Editor dialog with a list of fonts.

Use the quick switcher

  1. Press Ctrl+` or select form the menu.

  2. In the Switch popup, select Editor Color Scheme, and then select the desired color scheme.

Last modified: 30 January 2023

I would like to change the background color for the PyCharm source code editor. How can I do that?

I am running it under Ubuntu.

Jean-François Corbett's user avatar

asked May 15, 2016 at 14:47

Fanta's user avatar

4

Providing @Guoliang’s helpful comment as a formal answer, as the accepted answer does not answer the question:

Go to Settings > Editor > Colors & Fonts > General

On the right side, expand Text and select Default text

Modify Background as desired.

answered Dec 2, 2016 at 3:58

davidA's user avatar

davidAdavidA

12k8 gold badges61 silver badges91 bronze badges

0

A shortcut to bring up the style menu is CTRL+` (that’s the backtick key usually under Esc).

It brings up the Switch menu, with options for Color Scheme and Look and Feel.
Switch menus

The Color Scheme setting controls the colors of the main code editor pane. The Look and Feel setting controls the color for the entire interface (including the code editor if the Color Scheme is Default).

answered Jul 27, 2018 at 13:52

Justin's user avatar

JustinJustin

6,5013 gold badges36 silver badges56 bronze badges

Go to File > Settings > Editor > Color Scheme
Under Schemes, select Dracula (it’s a dark background). One can select others as well based on your likings.

answered Jun 19, 2018 at 18:00

Anp's user avatar

1

File -> Import Settings -> select the .jar file and restart PyCharm.

If it isn’t applied automatically you can select it in File -> Settings -> Editor -> Colors & Fonts.

Arnb's user avatar

answered Mar 12, 2016 at 16:17

Nuno André's user avatar

Nuno AndréNuno André

2412 silver badges5 bronze badges

3

I’ve stumbled into this question while searching for the same issue. 2 years have passed after this question was asked and in the meantime PyCharm has reached v. 5.0.3.

Unfortunately the GitHub link provided in the post above was not so illuminating, at least for me, so I started investigating on my own among PyCharm folders in Windows (mine is 7 Pro, bu I thik this applies also for other versions).

Here’s what I discovered:

  • There’s a particular place in user’s folder, from where PyCharm gets information about themes: its location is:
    %USERPROFILE%.PyCharm50configcolors

    To discover the exact path, just run a Command Prompt and type «set» to list environment variables; look for USERPROFILE value and you’re done (usually it’s *c:usersUserName*)

WHAT DID I DO:

  • Download a theme from here: [http://color-themes.com/?view=index][1] (e.g. «Cobalt»), saved to a temporary folder

  • using any zip-compatible program, such as 7zip, WinZip or Total Commander (which really rocks :) ), unzip the .jar file in the config folder. Make sure you select to unzip recursive folders!

  • (re)Start PyCharm, and you should see your new theme applied. If not, go to Configuration (Alt-F7), Editor >> Colors & Fonts section and click Scheme Pull-down: the new them should be listed there.

Happy Pythoning,
Max — Italy

answered Jan 21, 2016 at 11:11

Max1234 - Italy's user avatar

As of the most recent version of PyCharm (2017.2) this process is a lot more simplified.

On a Mac:
Preferences | Editor | Color Scheme — Click the settings cog next to Scheme and select Import Scheme… Then select the .icls file for the theme you want to add.

answered Jul 28, 2017 at 0:25

Michael Hall's user avatar

Even simpler in 2021 (I’m PyCharm 2020.3.3), if you are just looking for a pre-made theme:

  1. Open Project Settings (Ctrl-Alt-S)
  2. Select the Plugins section and type the word ‘theme’ in the Marketplace search box:

enter image description here

  1. Pick the theme(s) you like and click the install button.

Nowadays, there is a big number of choices around, so you probably find one that is just good for you (it can be customized as you like, anyway).

answered Feb 28, 2021 at 11:40

Max1234 - Italy's user avatar

Понравилась статья? Поделить с друзьями:
  • Sc551 00 ricoh ошибка
  • Sc500 ошибка ricoh mp2000
  • Sc500 ошибка ricoh 201
  • Sc error log удалить
  • Sap как изменить язык