-
- if ((conservationLength > i) && (conservation[i] != '*')
- && (conservation[i] != '+'))
- {
- if (jalview.util.Comparison.isGap(conservation[i]))
- {
- currentColour = Color.white;
- }
- else
- {
- float t = 11 - (conservation[i] - '0');
- if (t == 0)
- {
- return Color.white;
- }
-
- int red = currentColour.getRed();
- int green = currentColour.getGreen();
- int blue = currentColour.getBlue();
-
- int dr = 255 - red;
- int dg = 255 - green;
- int db = 255 - blue;
-
- dr *= t / 10f;
- dg *= t / 10f;
- db *= t / 10f;
-
- red += (inc / 20f) * dr;
- green += (inc / 20f) * dg;
- blue += (inc / 20f) * db;
-
- if (red > 255 || green > 255 || blue > 255)
- {
- currentColour = Color.white;
- }
- else
- {
- currentColour = new Color(red, green, blue);
- }
- }
- }
- return currentColour;