return null;
}
- JalviewColourScheme scheme = JalviewColourScheme.forName(name);
+
+ /*
+ * if this is the name of a registered colour scheme, just
+ * create a new instance of it
+ */
+ ColourSchemeI scheme = ColourSchemes.getInstance().getColourScheme(
+ name, forData);
if (scheme != null)
{
- return scheme.getColourScheme(forData);
+ return scheme;
}
/*
* e.g. "red" or "ff00ed",
* or failing that hash the name to a colour
*/
- UserColourScheme ucs = null;
- try
- {
- ucs = new UserColourScheme(name);
- } catch (Exception e)
- {
- // System.err.println("Ignoring exception when parsing colourscheme as applet-parameter");
- }
+ UserColourScheme ucs = new UserColourScheme(name);
return ucs;
}