Color getTempColor() {
        if (temp < 1200) {
            int x = (int) (255 * (temp - 800) / 400);
            if (x < 0) {
                x = 0;
            }
            return new Color(x, 0, 0);
        }
        if (temp < 1700) {
            int x = (int) (255 * (temp - 1200) / 500);
            if (x < 0) {
                x = 0;
            }
            return new Color(255, x, 0);
        }
        if (temp < 2400) {
            int x = (int) (255 * (temp - 1700) / 700);
            if (x < 0) {
                x = 0;
            }
            return new Color(255, 255, x);
        }
        return Color.white;
    }