JAL-2360 refactoring for JalviewColourScheme enum,
[jalview.git] / src / jalview / bin / JalviewLite.java
index 9fd8a90..3ecf22b 100644 (file)
@@ -51,6 +51,7 @@ import jalview.javascript.JsCallBack;
 import jalview.javascript.MouseOverStructureListener;
 import jalview.structure.SelectionListener;
 import jalview.structure.StructureSelectionManager;
+import jalview.util.ColorUtils;
 import jalview.util.HttpUtils;
 import jalview.util.MessageManager;
 
@@ -2883,22 +2884,13 @@ public class JalviewLite extends Applet implements
     {
       return defcolour;
     }
-    Color col = jalview.schemes.ColourSchemeProperty
-            .getAWTColorFromName(colprop);
+    Color col = ColorUtils.parseColourString(colprop);
     if (col == null)
     {
-      try
-      {
-        col = new jalview.schemes.UserColourScheme(colprop).findColour('A');
-      } catch (Exception ex)
-      {
-        System.err.println("Couldn't parse '" + colprop
-                + "' as a colour for " + colparam);
-        col = null;
-      }
+      System.err.println("Couldn't parse '" + colprop
+              + "' as a colour for " + colparam);
     }
     return (col == null) ? defcolour : col;
-
   }
 
   public void openJalviewHelpUrl()