Color (String... colorKeys) { Color c = null; for (String key : colorKeys) { c = UIManager.getColor(key); if (c != null) { break; } } assert c != null : "Can't find color for keys " + Arrays.toString(colorKeys); return c; }