Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Color getPointColor(int i, int j, float min, float max) {
- int value = Math.round((currentValues[i][j] - min) / (max - min) * 255);
- int blue = value;
- int red = 255 - blue;
- if (blue > 255) blue = 255;
- if (blue < 0) blue = 0;
- if (red > 255) red = 255;
- if (red < 0) red = 0;
- return new Color(red, 0, blue);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement