A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://plugins.jetbrains.com/docs/intellij/platform-theme-colors.html below:

Platform Theme Colors | IntelliJ Platform Plugin SDK

Platform Theme Colors

There are two default color themes: IntelliJ Light and Darcula.

Use the colors consistently within the default themes. To do so, follow these guidelines:

UI components

Colors for UI components are specified with color keys. A color key is a name of a color property in a particular component, e.g. ComboBox.background, or a generic color property for several components, e.g. Component.borderColor.

Color keys of a combo box

Each key has two default color values: one for IntelliJ Light and another for Darcula. Example: ComboBox.background is #FFFFFF in IntelliJ Light and #3C3F41 in Darcula.

Keys allow creating custom color themes. A custom theme is one of the default themes plus a set of color keys with new values in a JSON file. Example: the High contrast theme is a custom theme based on Darcula. New color values are stored in the HighContrast.theme.json JSON file.

See custom themes in the JetBrains Marketplace repository.

See the meanings of the parts in a color key in the key naming scheme.

See a complete list of keys with their descriptions in the JSON files: IntelliJPlatform.themeMetadata.json, JDK.themeMetadata.json.

See the color values for the currently selected theme in the LaF Defaults dialog:

To store color values between theme switching, use a scratch *.theme.json file. This might be useful if you want to test colors before implementing them. See guidelines for the Theme JSON Structure.

For IntelliJ designers:

If a color is needed:

  1. Choose a color value for all default themes:

  1. Choose a color key if a component does not have it:

Example

Incorrect: A new component with a light-blue background reuses Focus.borderColor, which has a light-blue color in the default themes. A theme author decides they need a bright focus border and changes the color value for Focus.borderColor. As a result, the new component has a bright background with the text unreadable over it.

Correct: A new component with a light-blue background has its own color key ComponentName.background.

Implementation Use JBColor.namedColor to set a color key and fallback color values:

val SELECTED_BACKGROUND_COLOR: Color = JBColor.namedColor( "CompletionPopup.selectionBackground", JBColor(0xc5dffc, 0x113a5c) )

private static final Color SELECTED_BACKGROUND_COLOR = JBColor.namedColor( "CompletionPopup.selectionBackground", new JBColor(0xc5dffc, 0x113a5c) );

29 April 2025


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4