- if (s.equals(max))\r
- return new Color(154, 154, 255);\r
- else if (ResidueProperties.getBLOSUM62(max, s) > 0)\r
- return new Color(204, 204, 255);\r
- else\r
- return Color.white;\r
+ if (consensus == null ||\r
+ j >= consensus.length ||\r
+ consensus[j] == null ||\r
+ (threshold != 0 && !aboveThreshold(s, j)))\r
+ {\r
+ return Color.white;\r
+ }\r
+\r
+ Color currentColour;\r