From: Jim Procter Date: Fri, 15 Sep 2017 10:48:24 +0000 (+0100) Subject: JAL-1950 update colour gradient variables to new, more verbose names X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9ccc2a53201bd4574572bb7b23d3435e89f842fa;p=jalview.git JAL-1950 update colour gradient variables to new, more verbose names --- diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index f646963..3ed18bf 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -197,7 +197,7 @@ public class AnnotationColourGradient extends FollowerColourScheme } else { - seqannot = new IdentityHashMap(); + seqannot = new IdentityHashMap<>(); } // resolve the context containing all the annotation for the sequence AnnotatedCollectionI alcontext = alignment instanceof AlignmentI @@ -482,8 +482,9 @@ public class AnnotationColourGradient extends FollowerColourScheme 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); + int dr = (int) (redRange * range + redMin), + dg = (int) (greenRange * range + greenMin), + db = (int) (blueRange * range + blueMin); if (annotation.score == annotation.score && positionToTransparency) { return new Color(Math.min(dr + trans, midtr), Math.min(dg