void (@NotNull AnActionEvent e) { Component component = e.getInputEvent().getComponent(); ImageComponentDecorator decorator = ImageEditorActionUtil.getImageComponentDecorator(e); if (component != null && decorator != null) { ColorChooserService.getInstance().showPopup(e.getProject(), null, null, new ColorListener() { @Override public void colorChanged(Color color, Object source) { myIcon.color = color; component.repaint(); decorator.setEditorBackground(color); } }); } }