JAL-2624 additional tests for FeatureColour.getColour(),
[jalview.git] / src / jalview / schemes / FeatureColour.java
index ed3e02d..b748d9e 100644 (file)
@@ -553,9 +553,13 @@ public class FeatureColour implements FeatureColourI
 
     /*
      * graduated colour case, optionally with threshold
-     * (treating Float.NaN as within visible range here)
+     * Float.NaN is assigned minimum visible score colour
      */
     float scr = feature.getScore();
+    if (Float.isNaN(scr))
+    {
+      return getMinColour();
+    }
     if (isAboveThreshold() && scr <= threshold)
     {
       return null;
@@ -568,10 +572,6 @@ public class FeatureColour implements FeatureColourI
     {
       return getMaxColour();
     }
-    if (Float.isNaN(scr))
-    {
-      return getMinColour();
-    }
     float scl = (scr - base) / range;
     if (isHighToLow)
     {