User-configurable colors for plugin toolwindow


Hi, guys,

I have a plugin with tool window, and I want user to have ability to change colors of it. In other words, I want to add section with colors under "Settings / Editor / Color Scheme" so user may change it.

I've have read Platform SDK about themes - doesn't help

I've created test plugin like here - it doesn't have configurable colors either (only hardcoded)

Please, show me some directions :)


Comment actions Permalink

If you want user to be able to customize colors via Theme plugin, then your plugin must expose metadata for your specific keys:


To expose colors directly in UI for customization by user, use com.intellij.openapi.options.colors.ColorAndFontDescriptorsProvider / com.intellij.openapi.options.colors.ColorSettingsPage. Please note, that settings in "Settings / Editor / Color Scheme" should be used for text/output-related customization only, not for customizing UI elements (use Theme keys from above). See com.intellij.openapi.vcs.actions.VcsColorsPageFactory from Preferences | Editor | Color Scheme | VCS for a "custom" settings page that is not bound to "real" editor.

Comment actions Permalink

Thanks a lot,

It seems to be a right example


Please sign in to leave a comment.