@Override
    public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus ) {
        Component res = renderer.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus );
        if( res instanceof JLabel ) {
            synchronized( renderer ) {
                JLabel label = ( JLabel ) res;
                int height = isGTK ? 10 : Math.max( res.getPreferredSize().height - 4, 4 );
                Icon icon = null;
                if( value instanceof ColorValue ) {
                    ColorValue color = ( ColorValue ) value;
                    if (value == ColorValue.CUSTOM_COLOR || value == ColorValue.RANDOM_COLOR) {
                        icon = null;
                    } else {
                        icon = new ColorIcon(color.color, height);
                    }
                    label.setText( color.text );
                } else {
                    icon = null;
                }
                label.setIcon( icon );
            }
        }
        return res;
    }