+
+ // Shading parameters
+ // currently hardwired for alphafold
+ Color maxColor = new Color(246, 252, 243),
+ minColor = new Color(0, 60, 26),
+ selMinColor = new Color(26, 0, 60),
+ selMaxColor = new Color(243, 246, 252);
+
+ Color shadeFor(float min, float max, float value)
+ {
+ return jalview.util.ColorUtils.getGraduatedColour(value, 0, minColor,
+ max, maxColor);
+ }
+
+ public Color getColorForRange(float min, float max, ContactListI cl,
+ int i, int j)
+ {
+ ContactRange cr = cl.getRangeFor(i, j);
+ // average for moment - probably more interested in maxIntProj though
+ return shadeFor(min, max, (float) cr.getMean());
+ }
+
+ public Color getSelectedColorForRange(float min, float max,
+ ContactListI cl, int i, int j)
+ {
+ ContactRange cr = cl.getRangeFor(i, j);
+ // average for moment - probably more interested in maxIntProj though
+ return jalview.util.ColorUtils.getGraduatedColour((float) cr.getMean(),
+ 0, selMinColor, max, selMaxColor);
+ }
+