IntelliJ IDEA 2017.3 Help

Configuring Colors and Fonts

On this page:


With IntelliJ IDEA, you can maintain your preferable colors and fonts layout for syntax and error highlighting in the editor, search results, Debugger and consoles via font and color schemes.

IntelliJ IDEA comes with a number of pre-defined color schemes. You can select one of them, or create your own one, and configure its settings to your taste.

It's important to mention the node Language Defaults - it contains the settings that are common for all the supported languages. It's enough to change one of the settings there, and then inherit this setting from the defaults.

Configuring colors and fonts

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Font under the Editor node.
  2. Select the desired scheme from the Scheme name drop-down list.
  3. Under the Color Scheme node, define the font families used in the editor and in the console. When you open the Font page, or Console Fonts under the Color Scheme node, IntelliJ IDEA displays the Editor Font area where you can configure the primary and secondary fonts, their size and line spacing.
    editor font
  4. Under the Color Scheme node, open the corresponding pages to configure specific color preferences for the supported languages and IntelliJ IDEA components.

Changing the language defaults

The node Language Defaults is actually language-agnostic. It contains the settings that are common to the majority of the supported languages (keywords, dots, commas, parenthesis etc.)

Select the node Language Defaults, and in the list of textual components, select the component Keyword. The background of the keywords is white; let's make it yellow.

To do that, select the checkbox to the left of the field name Background, and then click the white swatch. The Color Picker opens — all you need to do is to select the desired color and click OK:

configuring language defaults

So far, the changes to the language defaults are made; now let's look how they can be inherited.

Example: changing font for JavaScript

Click JavaScript node.

In the list of language components select Keyword, and see that the keywords now have the yellow background:

use inherited attributes1

It's important to note that the checkbox Inherite values from is selected!

use inherited attributes

Clicking the link below this checkbox leads you to the respective page under Colors Scheme node, in this case to Language Defaults.

Next, clear the checkbox Inherite values from, and define the desired font type using the Bold and Italic checkboxes. In this case, these textual components will change for the selected language only!

Observe results in the preview pane.

color scheme

Semantic highlighting

What happens if there is a function/method with a long list of uniformly highlighted parameters? One can easily make IntelliJ IDEA distinguish each parameter from the others using the semantic highlighting.

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Color Scheme, and then click the Language Defaults page.
  2. In the list of the supported Java components, choose Semantic highlighting.
  3. In the right-hand pane, select the Semantic highlighting checkbox:
    semantic highlighting

After that, all the parameters in a lengthy list will get the colors from the suggested swatches. If one is not happy with the suggested colors, click on a swatch to choose the suitable color.

Last modified: 6 March 2018

See Also