JAL-2360 findColour() with no args removed from ColourSchemeI
[jalview.git] / src / jalview / util / ColorUtils.java
index 55db824..d7829df 100644 (file)
@@ -256,11 +256,15 @@ public class ColorUtils
    */
   public static Color createColourFromName(String name)
   {
+    if (name == null)
+    {
+      return Color.white;
+    }
     int lsize = name.length();
     int start = 0;
     int end = lsize / 3;
   
-    int rgbOffset = Math.abs(name.hashCode() % 10) * 15;
+    int rgbOffset = Math.abs(name.hashCode() % 10) * 15; // 0-135
   
     /*
      * red: first third