Index: trunk/src/org/openstreetmap/josm/gui/MapScaler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapScaler.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/MapScaler.java	(revision 12987)
@@ -15,5 +15,5 @@
 import javax.swing.JComponent;
 
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.help.Helpful;
 
@@ -29,5 +29,5 @@
     private static final int PADDING_RIGHT = 50;
 
-    private static final ColorProperty SCALER_COLOR = new ColorProperty(marktr("scale"), Color.WHITE);
+    private static final NamedColorProperty SCALER_COLOR = new NamedColorProperty(marktr("scale"), Color.WHITE);
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 12987)
@@ -71,6 +71,6 @@
 import org.openstreetmap.josm.data.preferences.AbstractProperty;
 import org.openstreetmap.josm.data.preferences.BooleanProperty;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
 import org.openstreetmap.josm.data.preferences.DoubleProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.help.Helpful;
 import org.openstreetmap.josm.gui.progress.swing.PleaseWaitProgressMonitor;
@@ -80,4 +80,5 @@
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.ColorHelper;
 import org.openstreetmap.josm.tools.Destroyable;
 import org.openstreetmap.josm.tools.GBC;
@@ -110,6 +111,6 @@
      * @since 6789
      */
-    public static final ColorProperty PROP_BACKGROUND_COLOR = new ColorProperty(
-            marktr("Status bar background"), "#b8cfe5");
+    public static final NamedColorProperty PROP_BACKGROUND_COLOR = new NamedColorProperty(
+            marktr("Status bar background"), ColorHelper.html2color("#b8cfe5"));
 
     /**
@@ -117,6 +118,6 @@
      * @since 6789
      */
-    public static final ColorProperty PROP_ACTIVE_BACKGROUND_COLOR = new ColorProperty(
-            marktr("Status bar background: active"), "#aaff5e");
+    public static final NamedColorProperty PROP_ACTIVE_BACKGROUND_COLOR = new NamedColorProperty(
+            marktr("Status bar background: active"), ColorHelper.html2color("#aaff5e"));
 
     /**
@@ -124,5 +125,5 @@
      * @since 6789
      */
-    public static final ColorProperty PROP_FOREGROUND_COLOR = new ColorProperty(
+    public static final NamedColorProperty PROP_FOREGROUND_COLOR = new NamedColorProperty(
             marktr("Status bar foreground"), Color.black);
 
@@ -131,5 +132,5 @@
      * @since 6789
      */
-    public static final ColorProperty PROP_ACTIVE_FOREGROUND_COLOR = new ColorProperty(
+    public static final NamedColorProperty PROP_ACTIVE_FOREGROUND_COLOR = new NamedColorProperty(
             marktr("Status bar foreground: active"), Color.black);
 
Index: trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterButton.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterButton.java	(revision 12987)
@@ -12,5 +12,5 @@
 
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.MainApplication;
 
@@ -21,5 +21,5 @@
 public class AutoFilterButton extends JButton {
 
-    private static final ColorProperty PROP_COLOR = new ColorProperty("auto.filter.button.color", new Color(0, 160, 160));
+    private static final NamedColorProperty PROP_COLOR = new NamedColorProperty("auto.filter.button.color", new Color(0, 160, 160));
 
     private final AutoFilter filter;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java	(revision 12987)
@@ -6,5 +6,5 @@
 import java.awt.Color;
 
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 
 /**
@@ -82,8 +82,8 @@
     FGCOLOR_MEMBER_REMOVE(marktr("Conflict foreground: remove member"), Color.black);
 
-    private final ColorProperty property;
+    private final NamedColorProperty property;
 
     ConflictColors(String name, Color defaultColor) {
-        property = new ColorProperty(name, defaultColor);
+        property = new NamedColorProperty(name, defaultColor);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 12987)
@@ -52,5 +52,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.visitor.OsmPrimitiveVisitor;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.HelpAwareOptionPane;
 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
@@ -78,6 +78,6 @@
 public final class ConflictDialog extends ToggleDialog implements ActiveLayerChangeListener, IConflictListener, DataSelectionListener {
 
-    private static final ColorProperty CONFLICT_COLOR = new ColorProperty(marktr("conflict"), Color.GRAY);
-    private static final ColorProperty BACKGROUND_COLOR = new ColorProperty(marktr("background"), Color.BLACK);
+    private static final NamedColorProperty CONFLICT_COLOR = new NamedColorProperty(marktr("conflict"), Color.GRAY);
+    private static final NamedColorProperty BACKGROUND_COLOR = new NamedColorProperty(marktr("background"), Color.BLACK);
 
     /** the collection of conflicts displayed by this conflict dialog */
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java	(revision 12987)
@@ -24,5 +24,5 @@
 import org.openstreetmap.josm.data.preferences.BooleanProperty;
 import org.openstreetmap.josm.data.preferences.CachingProperty;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 
 /**
@@ -33,8 +33,8 @@
 
     private static final CachingProperty<Color> SELECTED_FG
-            = new ColorProperty(marktr("Discardable key: selection Foreground"), Color.GRAY).cached();
+            = new NamedColorProperty(marktr("Discardable key: selection Foreground"), Color.GRAY).cached();
     private static final CachingProperty<Color> SELECTED_BG;
     private static final CachingProperty<Color> NORMAL_FG
-            = new ColorProperty(marktr("Discardable key: foreground"), Color.GRAY).cached();
+            = new NamedColorProperty(marktr("Discardable key: foreground"), Color.GRAY).cached();
     private static final CachingProperty<Color> NORMAL_BG;
     private static final CachingProperty<Boolean> DISCARDABLE
@@ -42,7 +42,7 @@
 
     static {
-        SELECTED_BG = new ColorProperty(marktr("Discardable key: selection Background"),
+        SELECTED_BG = new NamedColorProperty(marktr("Discardable key: selection Background"),
                 Optional.ofNullable(UIManager.getColor("Table.selectionBackground")).orElse(Color.BLUE)).cached();
-        NORMAL_BG = new ColorProperty(marktr("Discardable key: background"),
+        NORMAL_BG = new NamedColorProperty(marktr("Discardable key: background"),
                 Optional.ofNullable(UIManager.getColor("Table.background")).orElse(Color.WHITE)).cached();
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 12987)
@@ -26,5 +26,5 @@
 import org.openstreetmap.josm.data.gpx.GpxTrack;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.MapView;
@@ -100,5 +100,5 @@
 
     @Override
-    protected ColorProperty getBaseColorProperty() {
+    protected NamedColorProperty getBaseColorProperty() {
         return GpxDrawHelper.DEFAULT_COLOR;
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/Layer.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/layer/Layer.java	(revision 12987)
@@ -29,5 +29,5 @@
 import org.openstreetmap.josm.data.preferences.AbstractProperty;
 import org.openstreetmap.josm.data.preferences.AbstractProperty.ValueChangeListener;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.data.projection.ProjectionChangeListener;
@@ -204,8 +204,7 @@
      */
     public AbstractProperty<Color> getColorProperty() {
-        ColorProperty base = getBaseColorProperty();
+        NamedColorProperty base = getBaseColorProperty();
         if (base != null) {
-            // cannot cache this - name may change.
-            return base.getChildColor("layer " + getName());
+            return base.getChildColor(NamedColorProperty.COLOR_CATEGORY_LAYER, getName(), base.getName());
         } else {
             return null;
@@ -218,5 +217,5 @@
      * @since 10824
      */
-    protected ColorProperty getBaseColorProperty() {
+    protected NamedColorProperty getBaseColorProperty() {
         return null;
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 12987)
@@ -81,6 +81,6 @@
 import org.openstreetmap.josm.data.osm.visitor.paint.Rendering;
 import org.openstreetmap.josm.data.osm.visitor.paint.relations.MultipolygonCache;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
 import org.openstreetmap.josm.data.preferences.IntegerProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.data.preferences.StringProperty;
 import org.openstreetmap.josm.data.projection.Projection;
@@ -153,6 +153,6 @@
     public static final StringProperty PROPERTY_SAVE_EXTENSION = new StringProperty("save.extension.osm", "osm");
 
-    private static final ColorProperty PROPERTY_BACKGROUND_COLOR = new ColorProperty(marktr("background"), Color.BLACK);
-    private static final ColorProperty PROPERTY_OUTSIDE_COLOR = new ColorProperty(marktr("outside downloaded area"), Color.YELLOW);
+    private static final NamedColorProperty PROPERTY_BACKGROUND_COLOR = new NamedColorProperty(marktr("background"), Color.BLACK);
+    private static final NamedColorProperty PROPERTY_OUTSIDE_COLOR = new NamedColorProperty(marktr("outside downloaded area"), Color.YELLOW);
 
     /** List of recent relations */
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 12987)
@@ -43,5 +43,5 @@
 import org.openstreetmap.josm.data.gpx.GpxData.GpxDataChangeListener;
 import org.openstreetmap.josm.data.gpx.WayPoint;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.MapViewState;
@@ -69,5 +69,5 @@
      * @since 10824
      */
-    public static final ColorProperty DEFAULT_COLOR = new ColorProperty(marktr("gps point"), Color.magenta);
+    public static final NamedColorProperty DEFAULT_COLOR = new NamedColorProperty(marktr("gps point"), Color.magenta);
 
     private final GpxData data;
@@ -266,5 +266,8 @@
     public Color getColor(String layerName, boolean ignoreCustom) {
         if (ignoreCustom || getColorMode(layerName) == ColorMode.NONE) {
-            return DEFAULT_COLOR.getChildColor(specName(layerName)).get();
+            return DEFAULT_COLOR.getChildColor(
+                    NamedColorProperty.COLOR_CATEGORY_LAYER,
+                    layerName,
+                    DEFAULT_COLOR.getName()).get();
         } else {
             return null;
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 12987)
@@ -38,5 +38,5 @@
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapView;
@@ -79,5 +79,5 @@
 
     private static final Color DEFAULT_COLOR = Color.magenta;
-    private static final ColorProperty COLOR_PROPERTY = new ColorProperty(marktr("gps marker"), DEFAULT_COLOR);
+    private static final NamedColorProperty COLOR_PROPERTY = new NamedColorProperty(marktr("gps marker"), DEFAULT_COLOR);
 
     /**
@@ -163,5 +163,5 @@
 
     @Override
-    protected ColorProperty getBaseColorProperty() {
+    protected NamedColorProperty getBaseColorProperty() {
         return COLOR_PROPERTY;
     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 12987)
@@ -18,5 +18,5 @@
 import java.util.Locale;
 
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.mappaint.Keyword;
 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition;
@@ -1134,5 +1134,10 @@
         LOOKAHEAD(2)
         pref=ident() t=<HEXCOLOR>
-        { return new ColorProperty("mappaint." + (sheet == null ? "MapCSS" : sheet.title) + "." + pref, t.image).get(); }
+        {
+            return new NamedColorProperty(
+                    NamedColorProperty.COLOR_CATEGORY_MAPPAINT,
+                    sheet == null ? "MapCSS" : sheet.title, pref,
+                    ColorHelper.html2color(t.image)).get();
+        }
     |
         t=<IDENT> { return new Keyword(t.image); }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 12987)
@@ -29,5 +29,5 @@
 import javax.swing.table.DefaultTableModel;
 
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.spi.preferences.ListListSetting;
 import org.openstreetmap.josm.spi.preferences.ListSetting;
@@ -336,8 +336,8 @@
     static final class SettingCellRenderer extends DefaultTableCellRenderer {
         private final Color backgroundColor = UIManager.getColor("Table.background");
-        private final Color changedColor = new ColorProperty(
+        private final Color changedColor = new NamedColorProperty(
                          marktr("Advanced Background: Changed"),
                          new Color(200, 255, 200)).get();
-        private final Color nonDefaultColor = new ColorProperty(
+        private final Color nonDefaultColor = new NamedColorProperty(
                             marktr("Advanced Background: NonDefault"),
                             new Color(255, 255, 200)).get();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 12987)
@@ -13,9 +13,10 @@
 import java.text.Collator;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Optional;
+import java.util.stream.Collectors;
 
 import javax.swing.BorderFactory;
@@ -34,5 +35,7 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.preferences.ColorInfo;
 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.data.validation.Severity;
 import org.openstreetmap.josm.gui.MapScaler;
@@ -52,8 +55,11 @@
 import org.openstreetmap.josm.tools.ColorHelper;
 import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.I18n;
 
 /**
  * Color preferences.
+ *
+ * GUI preference to let the user customize named colors.
+ * @see NamedColorProperty
  */
 public class ColorPreference implements SubPreferenceSetting {
@@ -78,17 +84,68 @@
     private static class ColorEntry {
         String key;
-        Color color;
-
-        ColorEntry(String key, String colorHtml) {
+        ColorInfo info;
+
+        ColorEntry(String key, ColorInfo info) {
             CheckParameterUtil.ensureParameterNotNull(key, "key");
+            CheckParameterUtil.ensureParameterNotNull(info, "info");
             this.key = key;
-            this.color = ColorHelper.html2color(colorHtml);
-            if (this.color == null) {
-                Logging.warn("Unable to get color from '"+colorHtml+"' for color preference '"+key+'\'');
-            }
-        }
-
+            this.info = info;
+        }
+
+        /**
+         * Get a description of the color based on the given info.
+         * @return a description of the color
+         */
         public String getDisplay() {
-            return Main.pref.getColorName(key);
+            switch (info.getCategory()) {
+                case NamedColorProperty.COLOR_CATEGORY_LAYER:
+                    String v = null;
+                    if (info.getSource() != null) {
+                        v = info.getSource();
+                    }
+                    if (!info.getName().isEmpty()) {
+                        if (v == null) {
+                            v = tr(I18n.escape(info.getName()));
+                        } else {
+                            v += " - " + tr(I18n.escape(info.getName()));
+                        }
+                    }
+                    return tr("Layer: {0}", v);
+                case NamedColorProperty.COLOR_CATEGORY_MAPPAINT:
+                    if (info.getSource() != null)
+                        return tr("Paint style {0}: {1}", tr(I18n.escape(info.getSource())), tr(info.getName()));
+                    // fall through
+                default:
+                    if (info.getSource() != null)
+                        return tr(I18n.escape(info.getSource())) + " - " + tr(I18n.escape(info.getName()));
+                    else
+                        return tr(I18n.escape(info.getName()));
+            }
+        }
+
+        /**
+         * Get the color value to display.
+         * Either value (if set) or default value.
+         * @return the color value to display
+         */
+        public Color getDisplayColor() {
+            return Optional.ofNullable(info.getValue()).orElse(info.getDefaultValue());
+        }
+
+        /**
+         * Check if color has been customized by the user or not.
+         * @return true if the color is at its default value, false if it is customized by the user.
+         */
+        public boolean isDefault() {
+            return info.getValue() == null || Objects.equals(info.getValue(),  info.getDefaultValue());
+        }
+
+        /**
+         * Convert to a {@link NamedColorProperty}.
+         * @return a {@link NamedColorProperty}
+         */
+        public NamedColorProperty toProperty() {
+            return new NamedColorProperty(info.getCategory(), info.getSource(),
+                    info.getName(), info.getDefaultValue());
         }
     }
@@ -143,5 +200,5 @@
         @Override
         public Object getValueAt(int rowIndex, int columnIndex) {
-            return columnIndex == 0 ? data.get(rowIndex) : data.get(rowIndex).color;
+            return columnIndex == 0 ? data.get(rowIndex) : data.get(rowIndex).getDisplayColor();
         }
 
@@ -159,7 +216,46 @@
         public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
             if (columnIndex == 1 && aValue instanceof Color) {
-                data.get(rowIndex).color = (Color) aValue;
+                data.get(rowIndex).info.setValue((Color) aValue);
                 fireTableRowsUpdated(rowIndex, rowIndex);
             }
+        }
+    }
+
+    /**
+     * Set the colors to be shown in the preference table. This method creates a table model if
+     * none exists and overwrites all existing values.
+     * @param colorMap the map holding the colors
+     * (key = preference key, value = {@link ColorInfo} instance)
+     */
+    public void setColors(Map<String, ColorInfo> colorMap) {
+        if (tableModel == null) {
+            tableModel = new ColorTableModel();
+        }
+        tableModel.clear();
+
+        // fill model with colors:
+        colorMap.entrySet().stream()
+                .map(e -> new ColorEntry(e.getKey(), e.getValue()))
+                .sorted((e1, e2) -> {
+                    int cat = Integer.compare(
+                            getCategroyPriority(e1.info.getCategory()),
+                            getCategroyPriority(e2.info.getCategory()));
+                    if (cat != 0) return cat;
+                    return Collator.getInstance().compare(e1.getDisplay(), e2.getDisplay());
+                })
+                .forEach(tableModel::addEntry);
+
+        if (this.colors != null) {
+            this.colors.repaint();
+        }
+
+    }
+
+    private static int getCategroyPriority(String category) {
+        switch (category) {
+            case NamedColorProperty.COLOR_CATEGORY_GENERAL: return 1;
+            case NamedColorProperty.COLOR_CATEGORY_MAPPAINT: return 2;
+            case NamedColorProperty.COLOR_CATEGORY_LAYER: return 3;
+            default: return 4;
         }
     }
@@ -171,37 +267,18 @@
      * (key = color id (without prefixes, so only <code>background</code>; not <code>color.background</code>),
      * value = html representation of the color.
-     */
+     * @deprecated (since 12987) replaced by {@link #setColors(java.util.Map)}
+     */
+    @Deprecated
     public void setColorModel(Map<String, String> colorMap) {
-        if (tableModel == null) {
-            tableModel = new ColorTableModel();
-        }
-
-        tableModel.clear();
-        // fill model with colors:
-        List<ColorEntry> colorKeyList = new ArrayList<>();
-        List<ColorEntry> colorKeyListMappaint = new ArrayList<>();
-        List<ColorEntry> colorKeyListLayer = new ArrayList<>();
-        for (Map.Entry<String, String> e : colorMap.entrySet()) {
-            String key = e.getKey();
-            String html = e.getValue();
-            if (key.startsWith("layer.")) {
-                colorKeyListLayer.add(new ColorEntry(key, html));
-            } else if (key.startsWith("mappaint.")) {
-                colorKeyListMappaint.add(new ColorEntry(key, html));
-            } else {
-                colorKeyList.add(new ColorEntry(key, html));
-            }
-        }
-        addColorRows(colorKeyList);
-        addColorRows(colorKeyListMappaint);
-        addColorRows(colorKeyListLayer);
-        if (this.colors != null) {
-            this.colors.repaint();
-        }
-    }
-
-    private void addColorRows(List<ColorEntry> entries) {
-        Collections.sort(entries, (e1, e2) -> Collator.getInstance().compare(e1.getDisplay(), e2.getDisplay()));
-        entries.forEach(tableModel::addEntry);
+        setColors(colorMap.entrySet().stream().collect(Collectors.toMap(e->e.getKey(), e->
+            new ColorInfo(NamedColorProperty.COLOR_CATEGORY_GENERAL, null, e.getKey(), ColorHelper.html2color(e.getValue()), null))));
+    }
+
+    /**
+     * Returns a map with the colors in the table (key = preference key, value = color info).
+     * @return a map holding the colors.
+     */
+    public Map<String, ColorInfo> getColors() {
+        return tableModel.getData().stream().collect(Collectors.toMap(e -> e.key, e -> e.info));
     }
 
@@ -209,9 +286,11 @@
      * Returns a map with the colors in the table (key = color name without prefix, value = html color code).
      * @return a map holding the colors.
-     */
+     * @deprecated replaced by {@link #getColors()}
+     */
+    @Deprecated
     public Map<String, String> getColorModel() {
         Map<String, String> colorMap = new HashMap<>();
         for (ColorEntry e : tableModel.getData()) {
-            colorMap.put(e.key, ColorHelper.color2html(e.color));
+            colorMap.put(e.key, ColorHelper.color2html(e.getDisplayColor()));
         }
         return colorMap;
@@ -221,5 +300,5 @@
     public void addGui(final PreferenceTabbedPane gui) {
         fixColorPrefixes();
-        setColorModel(Main.pref.getAllColors());
+        setColors(Main.pref.getAllNamedColors());
 
         colorEdit = new JButton(tr("Choose"));
@@ -227,5 +306,5 @@
             int sel = colors.getSelectedRow();
             ColorEntry ce = tableModel.getEntry(sel);
-            JColorChooser chooser = new JColorChooser(ce.color);
+            JColorChooser chooser = new JColorChooser(ce.getDisplayColor());
             int answer = JOptionPane.showConfirmDialog(
                     gui, chooser,
@@ -293,5 +372,5 @@
                     ColorEntry e = (ColorEntry) value;
                     label.setText(e.getDisplay());
-                    if (!Objects.equals(e.color, Main.pref.getDefaultColor(e.key))) {
+                    if (!e.isDefault()) {
                         label.setFont(label.getFont().deriveFont(Font.BOLD));
                     } else {
@@ -339,5 +418,5 @@
 
     Boolean isRemoveColor(int row) {
-        return tableModel.getEntry(row).key.startsWith("layer.");
+        return tableModel.getEntry(row).info.getCategory().equals(NamedColorProperty.COLOR_CATEGORY_LAYER);
     }
 
@@ -361,9 +440,12 @@
         boolean ret = false;
         for (ColorEntry d : tableModel.getDeleted()) {
-            Main.pref.putColor(d.key, null);
+            d.toProperty().remove();
         }
         for (ColorEntry e : tableModel.getData()) {
-            if (Main.pref.putColor(e.key, e.color) && e.key.startsWith("mappaint.")) {
-                ret = true;
+            if (!e.isDefault()) {
+                if (e.toProperty().put(e.info.getValue())
+                        && e.key.startsWith("mappaint.")) {
+                    ret = true;
+                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 12987)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.actions.ExpertToggleAction;
 import org.openstreetmap.josm.data.PreferencesUtils;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper;
 import org.openstreetmap.josm.gui.layer.markerlayer.Marker;
@@ -329,5 +330,6 @@
                 // ask the GPX draw for the correct color of that layer ( if there is one )
                 if (null != layerName) {
-                    color = GpxDrawHelper.DEFAULT_COLOR.getChildColor(layerName).get();
+                    color = GpxDrawHelper.DEFAULT_COLOR.getChildColor(
+                            NamedColorProperty.COLOR_CATEGORY_LAYER, layerName, GpxDrawHelper.DEFAULT_COLOR.getName()).get();
                 } else {
                     color = GpxDrawHelper.DEFAULT_COLOR.getDefaultValue();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 12987)
@@ -60,5 +60,5 @@
 import org.openstreetmap.josm.data.imagery.OffsetBookmark;
 import org.openstreetmap.josm.data.imagery.Shape;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.download.DownloadDialog;
@@ -248,5 +248,5 @@
         private static class ImageryURLTableCellRenderer extends DefaultTableCellRenderer {
 
-            private static final ColorProperty IMAGERY_BACKGROUND_COLOR = new ColorProperty(
+            private static final NamedColorProperty IMAGERY_BACKGROUND_COLOR = new NamedColorProperty(
                     marktr("Imagery Background: Default"),
                     new Color(200, 255, 200));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 12986)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 12987)
@@ -45,5 +45,5 @@
 import javax.swing.table.TableRowSorter;
 
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
@@ -160,8 +160,8 @@
     private class ShortcutTableCellRenderer extends DefaultTableCellRenderer {
 
-        private final transient ColorProperty SHORTCUT_BACKGROUND_USER_COLOR = new ColorProperty(
+        private final transient NamedColorProperty SHORTCUT_BACKGROUND_USER_COLOR = new NamedColorProperty(
                 marktr("Shortcut Background: User"),
                 new Color(200, 255, 200));
-        private final transient ColorProperty SHORTCUT_BACKGROUND_MODIFIED_COLOR = new ColorProperty(
+        private final transient NamedColorProperty SHORTCUT_BACKGROUND_MODIFIED_COLOR = new NamedColorProperty(
                 marktr("Shortcut Background: Modified"),
                 new Color(255, 255, 200));
