How to remove the gradient effect from the gauges?

So im trying to do a 8 bit style game and i want to get rid of the gradient effect given to gauges. Any idea how i can change that?
You should be able to get that effect by changing this function in rpg_windows.js:

JavaScript:
Window_Base.prototype.drawGauge = function(x, y, width, rate, color1, color2) {
    var fillW = Math.floor(width * rate);
    var gaugeY = y + this.lineHeight() - 8;
    this.contents.fillRect(x, gaugeY, width, 6, this.gaugeBackColor());
    this.contents.gradientFillRect(x, gaugeY, fillW, 6, color1, color2);
};

to this:

JavaScript:
Window_Base.prototype.drawGauge = function(x, y, width, rate, color1, color2) {
    var fillW = Math.floor(width * rate);
    var gaugeY = y + this.lineHeight() - 8;
    this.contents.fillRect(x, gaugeY, width, 6, this.gaugeBackColor());
    this.contents.fillRect(x, gaugeY, fillW, 6, color1);
};

You could also try replacing "color1" on the last line with "color2"; usually one will be a slightly brighter colour and the other a slightly darker colour.

EDIT: I just noticed you're the same person who asked for the Pretty Gauges plugin. This patch assumes that plugin is not enabled; however, there's very likely a similar way to do it with the plugin enabled if it provides other features you need.
You should be able to get that effect by changing this function in rpg_windows.js:

JavaScript:
Window_Base.prototype.drawGauge = function(x, y, width, rate, color1, color2) {
    var fillW = Math.floor(width * rate);
    var gaugeY = y + this.lineHeight() - 8;
    this.contents.fillRect(x, gaugeY, width, 6, this.gaugeBackColor());
    this.contents.gradientFillRect(x, gaugeY, fillW, 6, color1, color2);
};

to this:

JavaScript:
Window_Base.prototype.drawGauge = function(x, y, width, rate, color1, color2) {
    var fillW = Math.floor(width * rate);
    var gaugeY = y + this.lineHeight() - 8;
    this.contents.fillRect(x, gaugeY, width, 6, this.gaugeBackColor());
    this.contents.fillRect(x, gaugeY, fillW, 6, color1);
};

You could also try replacing "color1" on the last line with "color2"; usually one will be a slightly brighter colour and the other a slightly darker colour.

EDIT: I just noticed you're the same person who asked for the Pretty Gauges plugin. This patch assumes that plugin is not enabled; however, there's very likely a similar way to do it with the plugin enabled if it provides other features you need.

Yeah im using Pretty Gauges and in the JS script for the Pretty Gauges plugin the gradient command from what i can see is very different from the one used in the default script.
Looks like the same basic idea can apply for PrettyGauges - in the drawGauge function, just change all instances of color 1 to color 2 (or color 2 to color 1), including the gauge back color and the outline color.
Looks like the same basic idea can apply for PrettyGauges - in the drawGauge function, just change all instances of color 1 to color 2 (or color 2 to color 1), including the gauge back color and the outline color.
Hey thanks for the help! I was able to solve it by changing the color parameters in the plugin to the same color.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-remove-the-gradient-effect-from-the-gauges.123733/