- int dr = (int) (redRange * range + redMin);
- int dg = (int) (greenRange * range + greenMin);
- int db = (int) (blueRange * range + blueMin);
-
- return new Color(dr, dg, db);
+ // midtr sets the ceiling for bleaching out the shading
+ int trans = 0, midtr = 239;
+ if (perLineScore)
+ {
+ trans = (int) ((1f - range) * midtr);
+ range = (float) ((ann.score - plmin) / (plmax - aamin));
+ }
+ int dr = (int) (redRange * range + redMin),
+ dg = (int) (greenRange * range + greenMin),
+ db = (int) (blueRange * range + blueMin);
+ if (ann.score == ann.score && positionToTransparency)
+ {
+ return new Color(Math.min(dr + trans, midtr), Math.min(dg
+ + trans, midtr), Math.min(db + trans, midtr));
+ }
+ else
+ {
+ return new Color(dr, dg, db);
+ }