git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1958 modulate per-sequence shading with local score - low scores tend to grey.
[jalview.git]
/
src
/
jalview
/
schemes
/
AnnotationColourGradient.java
diff --git
a/src/jalview/schemes/AnnotationColourGradient.java
b/src/jalview/schemes/AnnotationColourGradient.java
index
8511d86
..
b580be2
100755
(executable)
--- a/
src/jalview/schemes/AnnotationColourGradient.java
+++ b/
src/jalview/schemes/AnnotationColourGradient.java
@@
-433,18
+433,19
@@
public class AnnotationColourGradient extends FollowerColourScheme
range = 0f;
}
}
range = 0f;
}
}
- int trans = 0;
+ // midtr sets the ceiling for bleaching out the shading
+ int trans = 0, midtr = 239;
if (perLineScore)
{
if (perLineScore)
{
- trans = (int) ((1f - range) * 255.0);
+ trans = (int) ((1f - range) * midtr);
range = (float) ((annotation.score - plmin) / (plmax - aamin));
}
int dr = (int) (rr * range + r1), dg = (int) (gg * range + g1), db = (int) (bb
* range + b1);
if (annotation.score == annotation.score && positionToTransparency)
{
range = (float) ((annotation.score - plmin) / (plmax - aamin));
}
int dr = (int) (rr * range + r1), dg = (int) (gg * range + g1), db = (int) (bb
* range + b1);
if (annotation.score == annotation.score && positionToTransparency)
{
- return new Color(Integer.min(dr + trans, 255), Integer.min(
- dg + trans, 255), Integer.min(db + trans, 255));
+ return new Color(Integer.min(dr + trans, midtr), Integer.min(dg
+ + trans, midtr), Integer.min(db + trans, midtr));
}
else
{
}
else
{