Skip to content

Commit

Permalink
Minor fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilJay committed Oct 25, 2014
1 parent 0b6fed5 commit b632d40
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class GreenToRedFormatter implements BarColorFormatter {
@Override
public int getColor(float value, float maxVal, float minVal) {

float hsv[] = new float[] { ((120f * ((maxVal-minVal) - value)) / (maxVal-minVal)), 1f, 1f };
float hsv[] = new float[] { ((120f * ((maxVal-minVal) - (value-minVal))) / (maxVal-minVal)), 1f, 1f };

return Color.HSVToColor(hsv);

Expand Down

0 comments on commit b632d40

Please sign in to comment.