Changing skill name colours?

Hello,

I've been trying for a while to have skills in my game that have their names in a certain colour. I've attached an example of what I would like (edited picture):

The purpose of this is for the player to distinguish which skills are exclusive to the character (the golden ones) and which ones are from scrolls, which work a bit like the magatamas in SMT: Nocturne (you equip a scroll, fight some battles and learn a skill).

However, if you try to use the escape codes that you would normally use in messages, what you get instead is "\c[14]Fervor Strike" in the skill list and during battle.

Is there a way to make it so that the codes I use for coloured text during dialogue also work in the skill menu and battle?

1761609402531.jpeg
Dunno. I would say \C but: its in the menu and you want it different in battle. Quite a problem. Hmm.
maybe in the scripts, look under the skills windows and there may be a line, that has it for windows and battles???
I think this should do the trick:
JavaScript:
(function() {
	const old_itemName = Window_Base.prototype.drawItemName;
	Window_Base.prototype.drawItemName = function(item) {
		if(item == null) return old_itemName.apply(this, arguments);
		var name = item.name;
		var text = this.convertEscapeCharacters(name);
		text = text.replace(/\x1b([{}<>.|!$\^]|[A-Z]+)/gi, '');
		item.name = text;
		old_itemName.apply(this, arguments);
		item.name = name;
	};
})();
Text color only works in message boxes if I remember correctly. You can try and use solar's snippet, but there's also this beautiful plugin from TSR which let's you use color codes pretty much anywhere you want to as well as make custom colors not available on vanilla.
For what it's worth, my snippet also allows you to use substitution codes like \V, \N, etc. My personal use for it was to substitute the name of an actor into the skill that summons that actor (using SRD's plugin).
Thank you everyone, it works now! I ended up using

TSR_TextColorAddOn.js​


Unfortunately I tried the script snippet:

(function() {
const old_itemName = Window_Base.prototype.drawItemName;
Window_Base.prototype.drawItemName = function(item) {
if(item == null) return old_itemName.apply(this, arguments);
var name = item.name;
var text = this.convertEscapeCharacters(name);
text = text.replace(/\x1b([{}<>.|!$\^]|[A-Z]+)/gi, '');
item.name = text;
old_itemName.apply(this, arguments);
item.name = name;
};
})();

But all it did was remove the "\" so for example the skill would be called "c[14]Fervor Strike". Maybe I did something wrong?

However, the problem is fixed and the thread can now be closed. Thanks guys!
I know it works in my project, but I'd have to check if I missed something from the snippet… in any case, if TSR's plugin is good enough for you, then I won't worry about it.

Original thread: https://forums.rpgmakerweb.com/threads/changing-skill-name-colours.180731/