Change the color of "locked" menus

Hello.
Is it possible to change the color of "locked" menus? Let me explain better:
for example, when fleeing from battle is disabled, the command turns gray. Is it possible to select a specific color for it? I'd like to make it red.
They don't actually render in a different colour, just a lower opacity. So if your default colour is white, they appear grey.

Assuming you want to change every instance of lowering transparency to making text red, this should work:

JavaScript:
Window_Base.prototype.changePaintOpacity = function (enabled) {
    if (enabled) this.resetTextColor();
    else this.changeTextColor("red");
}

You can replace red with any CSS colour.
They don't actually render in a different colour, just a lower opacity. So if your default colour is white, they appear grey.

Assuming you want to change every instance of lowering transparency to making text red, this should work:

JavaScript:
Window_Base.prototype.changePaintOpacity = function (enabled) {
    if (enabled) this.resetTextColor();
    else this.changeTextColor("red");
}

You can replace red with any CSS colour.
Thank you so much, I'll try! - where I need to paste this code?
But I want to keep the normal (unlocked) commands white and only the "locked one red.
Create a new file with any name and a .js extension, paste the code there, and add that file as a plugin.
This will make text red instead of lowering its opacity - it won't affect regular text.
Create a new file with any name and a .js extension, paste the code there, and add that file as a plugin.
This will make text red instead of lowering its opacity - it won't affect regular text.
It worked perfectly, thank you so much!
You can replace red with any CSS colour.
didn't know this, but if it's pure locked commands everywhere, I like to use
this into my base, extend it a bit more when the instance if menu, normal,
for battle red or any color, as checking the instanceof Scene_Battle only affect
the battle correct?
didn't know this, but if it's pure locked commands everywhere, I like to use
this into my base, extend it a bit more when the instance if menu, normal,
for battle red or any color, as checking the instanceof Scene_Battle only affect
the battle correct?
I'm not entirely sure what your question is. Are you asking if checking whether the current scene is instanceof Scene_Battle is a good way to determine if there is currently an ongoing battle? If so, the answer is generally yes, unless you have a plugin that adds things to battles using separate scenes (though that's quite rare).
I'm not entirely sure what....
no battle scene plugins, but using it like:

if (scene instanceof Scene_Battle) color = red
if (scene instanceof Scene_Menu) color = grey
etc so it has color ranges for example.
so you can decide what color for what scene, else return default color.
as 1 line can suffice for a struct so they can fill it out for the name and color.

more that way 🙂
From a design perspective, I'm not sure why you'd want to mark disabled options differently in different scenes - UI consistency is a rather nice thing to have. But from a technical standpoint there's no reason why this wouldn't work.

Original thread: https://forums.rpgmakerweb.com/threads/change-the-color-of-locked-menus.173516/