In this example, you can see how it is done.
In light theme:
Read about colors here
object ComposeIcons {
@JvmField
val ComposeToolWindow =
IconManager.getInstance().getIcon("/icons/composeToolWindow.svg", javaClass.getClassLoader())
}
And in plugin.xml:
<toolWindow factoryClass="org.jetbrains.plugins.template.toolWindow.ComposeSamplesToolWindowFactory"
icon="org.jetbrains.plugins.template.ComposeIcons.ComposeToolWindow"
id="ComposeSamples"/>