Merge branch 'develop' into features/mchmmer
[jalview.git] / src / jalview / renderer / ResidueShader.java
index fa7cf1f..b312730 100644 (file)
@@ -235,6 +235,11 @@ public class ResidueShader implements ResidueShaderI
   @Override
   public Color findColour(char symbol, int position, SequenceI seq)
   {
+    if (colourScheme == null)
+    {
+      return Color.white; // Colour is 'None'
+    }
+
     /*
      * get 'base' colour
      */
@@ -243,14 +248,16 @@ public class ResidueShader implements ResidueShaderI
             : profile.getModalResidue();
     float pid = profile == null ? 0f
             : profile.getPercentageIdentity(ignoreGaps);
-    Color colour = colourScheme == null ? Color.white
-            : colourScheme.findColour(symbol, position, seq, modalResidue,
-                    pid);
+    Color colour = colourScheme.findColour(symbol, position, seq,
+            modalResidue, pid);
 
     /*
      * apply PID threshold and consensus fading if in force
      */
-    colour = adjustColour(symbol, position, colour);
+    if (!Comparison.isGap(symbol))
+    {
+      colour = adjustColour(symbol, position, colour);
+    }
 
     return colour;
   }