MZ A simple(?) change to my menu [Solved]

Hello, I want to change the backgrounds of select-able items. I have tried several things and even thought I could fix it by simply adjusting the dimColor in managers.js, but that didn't work. >_< And there doesn't seem to be an option for changing it in Visustella's core engines.

Can someone please point me in the right direction on how to change these black backgrounds to something more colorful? I really appreciate the help.

PS I've been studying javascript and am absolutely rubbish at it, but I haven't given up, so please be kind. 🙁
Hi there!
By default, meaning on the default RPG Maker MZ code, this is the function that draws the rectangle background:
JavaScript:
Window_Selectable.prototype.drawBackgroundRect = function(rect) {
    const c1 = ColorManager.itemBackColor1();
    const c2 = ColorManager.itemBackColor2();
    const x = rect.x;
    const y = rect.y;
    const w = rect.width;
    const h = rect.height;
    this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
    this.contentsBack.strokeRect(x, y, w, h, c1);
};

It should just be a matter of changing the C1 and C2(color 1 and color 2).
So, if you want to change, you can replace these two variables with another color, in that format(using quotes):

"rgba(r, g, b, alpha)"

  • R,G,B → Range from 0 to 255.
  • Alpha → From 0 to 1(can use decimals)

You may have changed the default rpg maker code, but if any other plugin is overwriting these, it may not work.
So instead, you will need to make those changes, put on a .txt file, save that file with a .js extension, and put it as a plugin, on the bottom of your plugin list.
VisuMZ_0_CoreEngine > Window Settings >
1693129167015.png

Code:
const rect = arguments[0];
const c1 = ColorManager.itemBackColor1(); // Change top blend
const c2 = ColorManager.itemBackColor2(); // Change bottom blend
const x = rect.x;
const y = rect.y;
const w = rect.width;
const h = rect.height;
this.contentsBack.gradientFillRect(x, y, w, h, c1, c2, true);
//this.contentsBack.strokeRect(x, y, w, h, c1);
More options, in case it helps:
You can override these colours with a plugin that lets you configure the ColorManager, e.g. VisuStella Core Engine or my own Cae_MenuDisplayOpts~

Alternatively, you can put these methods in a .js file, edit the numbers, and import as a plugin:
JavaScript:
ColorManager.itemBackColor1 = function() {
    return "rgba(32, 32, 32, 0.5)";
};

ColorManager.itemBackColor2 = function() {
    return "rgba(0, 0, 0, 0.5)";
};
If you want it totally transparent, try a value with 0 alpha, e.g. rgba(0,0,0,0).
Wow thanks everyone! I think you're right, @Eliaquim, there was definitely another plugin that was messing with the menu so even after I changed the main codes, it didn't fix it. And after messing around with Visustella's Core engine (thank you @NaosoX for helping me find where the changes needed to be made) I was able to figure out it might be my Moghunter pluging that was keeping everything black. :/ (It's the only other plugin I have that affects the menu.)
In the end, @caethyril, your plugin was exactly what the doctor ordered!

After all the testing and everyone's help though, I feel like I'm able to actually comprehend java a little more, and I was able to look for those keywords with hardly any trouble. Learning a little at a time, thank you all! Definitely going to take some time to watch more classes about it so that I can learn to make these kinds of changes at will. XD
Wow thanks everyone! I think you're right, @Eliaquim, there was definitely another plugin that was messing with the menu so even after I changed the main codes, it didn't fix it. And after messing around with Visustella's Core engine (thank you @NaosoX for helping me find where the changes needed to be made) I was able to figure out it might be my Moghunter pluging that was keeping everything black. :/ (It's the only other plugin I have that affects the menu.)
In the end, @caethyril, your plugin was exactly what the doctor ordered!

After all the testing and everyone's help though, I feel like I'm able to actually comprehend java a little more, and I was able to look for those keywords with hardly any trouble. Learning a little at a time, thank you all! Definitely going to take some time to watch more classes about it so that I can learn to make these kinds of changes at will. XD
Looks great, and I like that your avatar is Mabel from Gravity Falls; love that show.
Great! Just a little note here:
I feel like I'm able to actually comprehend java a little more ... Definitely going to take some time to watch more classes about it
Java and JavaScript are two different languages. RPG Maker MZ uses HTML/JavaScript. 👋
Thank you, @SpyroFan67! lol, yeah it was a great show. My dad and I got really into the puzzles, so it's still one of my favorites. And I love your Spyro avatar, too! That was such a fun game.

Lol, thanks @caethyril for correcting me there. XD I'll remember that!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/a-simple-change-to-my-menu-solved.160662/