- 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
+ */
+ if (!Comparison.isGap(symbol))
+ {
+ colour = adjustColour(symbol, position, colour);
+ }
+
+ return colour;
+ }
+
+ @Override
+ public Color findSSColour(char symbol, int position, SequenceI seq)
+ {
+ if (colourScheme == null)
+ {
+ return Color.white; // Colour is 'None'
+ }
+
+ /*
+ * get 'base' colour
+ */
+ ProfileI profile = ssConsensus == null ? null : ssConsensus.get(position);
+ String modalSS = profile == null ? null
+ : profile.getModalSS();
+ float pid = profile == null ? 0f
+ : profile.getSSPercentageIdentity(ignoreGaps);
+ Color colour = colourScheme.findColour(symbol, position, seq,
+ modalSS, pid);