Trying to get a different coloured TP bar for each party member in Moghunter Battle HUD

Hi RPG makers,

I'm using the Moghunter HUD for my battle system and my goal is to get a different coloured TP bar for each party member. I was hoping this would be pretty simple, but it's proving to be a more difficult than I thought, but then again, I'm no js pro, haha. Far from it!

In the "Load Img" section of the js file, here's the part where I get the images from the folder for each of my 4 party members. I've done it so it looks at what the class name is for each of them, as my image names are "TP_Meter_Mage", "TP_Meter_Thief", "TP_Meter_Fighter", etc.:

Code:
if (String(Moghunter.bhud_tp_meter_visible) == "true") {
    this._tp_meter0_img = (ImageManager.loadBHud("TP_Meter_" + $gameParty.members()[0].currentClass().name));
    this._tp_meter1_img = (ImageManager.loadBHud("TP_Meter_" + $gameParty.members()[1].currentClass().name));
    this._tp_meter2_img = (ImageManager.loadBHud("TP_Meter_" + $gameParty.members()[2].currentClass().name));
    this._tp_meter3_img = (ImageManager.loadBHud("TP_Meter_" + $gameParty.members()[3].currentClass().name));
    };

I've also duplicated the section where the TP Meter is created another 3 times for each party member, and so each of those sections can call the sprites "_tp_meter0_img", "_tp_meter1_img", "_tp_meter2_img" & "_tp_meter3_img".

The TP bars seem to still be all using the same image though and seem to be using the image lowest on the list. I'm not surprised I did it wrong as very much an amateur with js, but I'm hoping it will be a simple fix. Any help would be super appreciated!
In the img/battlehud folder, there is a file TP_Meter.png that you can change. There's no need to change anything in the code to control the color.
In the img/battlehud folder, there is a file TP_Meter.png that you can change. There's no need to change anything in the code to control the color.

Yes, that is true. I have already edited that png file. I've saved lots of different versions of it with different colours. The next step in pulling off what I want to do will involve editing the js code, I'm afraid. I'm just not sure how to properly go about it.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-get-a-different-coloured-tp-bar-for-each-party-member-in-moghunter-battle-hud.122606/