Yanfly Engine Plugin - Is it possible to Color the Text of a Skill or Magic?

Hello everyone,


I want to know if it's possible to Color the Text of a Skill or a Magic with @Yanfly plugins engine? Do you know any idea how to do that?


I know how to color text in message with \C[X] but this wont work with a skill or magic.


Any idea anyone? Or maybe another plugin exist to color the text of skill or magic?


Thanks 😀
I don't recall where this came from, but this allows you to change items/weapons/armor/skills text color and is really easy to use. (And it works with Yanfly's stuff to boot!)


I do remember it was free to use commercially if you want, cause when I was building up a stash of useful plugins I was only getting ones with free usage saved up. Just remember to give proper credit to the original author. 🙂

Code:
//=============================================================================
// itemColors.js
//=============================================================================
 
/*:
 * @plugindesc Allows you to assign items and equipment colors.
 * @author kranasAngel
 *
 *
 * @help Changes the Item's color based on the notetag  
 * <itemColor:x> 
 * Where x is the color code that you want. 
 * To find Rpg maker color codes, search rpg maker color codes, or something similar.
 *
 *
 *
 *
*/
 
(function(){
 
Window_Base.prototype.drawItemName = function(item, x, y, width) {width = width || 312; if (item) {
	var iconBoxWidth = Window_Base._iconWidth + 4;
	this.resetTextColor();
	this.drawIcon(item.iconIndex, x + 2, y + 2);
	if (typeof item.meta.itemColor !== "undefined"){
		var element = parseInt(item.meta.itemColor);
		this.changeTextColor(this.textColor(element)) 
		console.log("item Color" + element);
		};
	this.drawText(item.name, x + iconBoxWidth, y, width - iconBoxWidth);
	this.resetTextColor();
	};
	};
})();
Thanks a lot this will be a nice touch to my project 😀
Image Layont.png?

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-engine-plugin-is-it-possible-to-color-the-text-of-a-skill-or-magic.69140/