Working with Icons
Platform vs. Custom Icons
Plugins should reuse existing platform icons whenever possible. Use Icons list to browse existing icons. Platform icons are located in
AllIcons. Icons from plugins are located in corresponding
<PLUGIN_NAME>Icons class (e.g.,
In the case of a Gradle-based project, icons should be placed in the resources folder. If the project is DevKit-based, the recommended approach is to put icons to a dedicated source root marked as Resources Root, e.g., icons or resources.
If the icons are referenced only in plugin.xml attributes or elements, or in the
icon attribute, then they can be referenced by paths. In case the icons are referenced from the code and/or XML many times, it's convenient to organize them in an icons holder class.
Define a class/interface in a top-level package called
icons holding icon constants as static fields:
When using Kotlin, fields must be annotated with
getIcon() method of
IconLoader can be used to access the icons. The path to the icon passed in as argument to
IconLoader.getIcon() must start with leading
Icons defined inside plugin.xml with
icon attribute for
<action> or extension point, as well in
icon attribute, can be referenced in two ways:
by icon file path
by icon constant in the icons holder class
To reference an icon by path, provide the path relative to the resources directory, e.g., for icons located in my-plugin/src/main/resources/icons directory:
In case of icons holder class, reference the icon constants. Note that if the class is located in the top-level
icons package, name
icons will be automatically prefixed and must not be specified. In case of placing the class in a custom package, the full package name must be provided, e.g.:
IntelliJ Platform supports Retina displays and has a bundled dark theme called Darcula. Thus, every icon should have a dedicated variant for Retina devices and Darcula theme. In some cases, you can skip dark variants if the original icon looks good under Darcula.
Required icon sizes depend on the usage as listed in the following table:
Icon Size (pixels)
Node, Action, Filetype
As SVG icons can be scaled arbitrarily, they provide better results in HiDPI environments or when used in combination with bigger screen fonts (e.g., in presentation mode).
A base size denoting the size (in the user space) of the rendered image in 1x scale should be provided. The size is set via the
height attributes omitting the size units. If unspecified, it defaults to 16x16 pixels.
A minimal SVG icon file:
The naming notation used for PNG icons (see below) is still relevant.
@2x version of an SVG icon should still provide the same base size. The icon graphics of such an icon can be expressed in more details via double precision. If the icon graphics are simple enough so that it renders perfectly in every scale, then the
@2x version can be omitted.
PNG Format (Deprecated)
All icon files must be placed in the same directory following this naming pattern (replace .png with .svg for SVG icons):
File name pattern
W x H
W x H
Default + Retina
2*W x 2*H
Darcula + Retina
2*W x 2*H
IconLoader class will load the icon that matches the best depending on the current environment.
Here are examples of toolWindowStructure.png icon representations:
Default + Retina
Darcula + Retina
Animated icons are a way to show that plugin is now performing some long-time action. For example, when plugin is loading some data.
Any animated icon is a set of frames that loop with some delay.
To create a new animated icon, use the
AnimatedIcon. If you want to create an icon where frames follow each other with the same delay, use a constructor that accepts a delay and icons:
To create an icon from frames with different delays, use
AnimatedIcon.Frame. Each frame represents an icon, and a delay until the next frame.
If you want to show somewhere that there is a long process, you can use the predefined
AnimatedIcon.Default loader icon. This icon has a larger
Register resource bundle via
com.intellij.iconDescriptionBundle extension point to provide tooltips automatically for all
icon.<icon-path>.tooltip key in given resource bundle, where
<icon-path> is the icon path with leading slash and
.svg removed and slashes replaced with dots (e.g.,
New UI Icons
To fully support the New UI, the plugin must provide additional dedicated icons and mapping information. This allows supporting both UI variants at the same time, depending on what the user has selected.
Create a new expUi folder in your icon root folder (Reference).
Copy all icons for the New UI into this folder.
Create an empty $PluginName$IconMappings.json mapping file in the resources root folder.
Register $PluginName$IconMappings.json in plugin.xml via the
All New UI icons must be mapped in the $PluginName$IconMappings.json mapping file.
For each New UI icon, add a mapping entry inside
expui block. Each folder starts a new block containing all its entries (see linked
MavenIconMappins.json sample from above).
In this example, the icon root folder is named icons:
If one new icon replaces several old icons, use a JSON list. Example from
New UI Tool Window Icons
The New UI uses outlined icons for tool windows that have a size of 20x20 pixels and 16x16 pixels in compact mode. Plugin developers who want to provide all necessary variants of their tool window icons use the following suffix scheme for their icon filename, here referred to as iconToolWindow:
iconToolWindow.svg: a 16x16 pixels compact mode variant of the icon for the light theme.
iconToolWindow_dark.svg: a 16x16 pixels compact mode variant of the icon for the dark theme.
iconToolWindow@20x20.svg: a 20x20 pixels variant of the icon for the light theme.
iconToolWindow@20x20_dark.svg: a 20x20 pixels variant of the icon for the dark theme.
New UI Icon Colors
To work as expected, the New UI requires specific colors for icon content. This is necessary for situations where tool window buttons are active, during which the background is highlighted. To enhance contrast, the IntelliJ Platform dynamically alters the icon's content color to white.
Hence, for the creation of light and dark mode variants, plugin authors must use the following prescribed colors within their icons: