How to change/tone the colour of sprites used by events?

I want to change/tone the colour of an event.

Let's say a chameleon runs around and on various occasions (player clicks it or another event triggers a switch) it changes its colour. So far I did not find any other way than to replace the sprite sheet with another one with the colour I want. But I bet there is something I am missing because the program lets me change the tone of pictures in general but not of these used by events. I don't want to use any plugins.
You can't do this using event commands, unless you replace the entire image. You would have to use JavaScript.
Is there an easy script or would that go deeper into javascript?
For a temporary change you could try something like this in a Script command:
JavaScript:
const char = $gameMap.event(1);
const ss = SceneManager._scene._spriteset;
const s = ss.findTargetSprite(char);
s.setHue(120);
I.e. "find the sprite corresponding to map event 1; if found, set its hue to +120°". Temporary because it'll reset when you leave the map, if not before.

Alternatively, for a colour tone (cf Tint Screen), replace the last line with something like this:
JavaScript:
s.setColorTone([-68, -68, -68, 255]);
...or, for a blend colour (cf Flash Screen):
JavaScript:
s.setBlendColor([0, 100, 200, 255]);
Eli CharManager can do it
Eli CharManager can do it
Thanks, I already found this. I want to work without plugins as much as possible because I basically know nothing about coding and I'm afraid if I rely too much on plugins without getting to know the basics it wont be much help to me in the long run. If it is easy to understand and I get tired of changing too much pictures I guess I come back to it 😉
For a temporary change you could try something like this in a Script command:
JavaScript:
const char = $gameMap.event(1);
const ss = SceneManager._scene._spriteset;
const s = ss.findTargetSprite(char);
s.setHue(120);
I.e. "find the sprite corresponding to map event 1; if found, set its hue to +120°". Temporary because it'll reset when you leave the map, if not before.

Alternatively, for a colour tone (cf Tint Screen), replace the last line with something like this:
JavaScript:
s.setColorTone([-68, -68, -68, 255]);
...or, for a blend colour (cf Flash Screen):
JavaScript:
s.setBlendColor([0, 100, 200, 255]);
If this is just a temporary thing I might just work with changing the sprite sheet of the event for now. I'll give this a shot though, thanks.
Thanks, I already found this. I want to work without plugins as much as possible because I basically know nothing about coding and I'm afraid if I rely too much on plugins without getting to know the basics it wont be much help to me in the long run.
What you want can't be done with eventing. You'll either have to use a script call or a plugin, which are just additional script calls in a separate file.
I'm afraid if I rely too much on plugins without getting to know the basics it wont be much help to me in the long run
Like Aqua says, changing map character hue/etc is not a basic feature, so this reasoning doesn't apply. A focused plugin is often a better solution than some cobbled-together script call, even in cases where the two options have exactly the same end result (which is not true in this case).

If this is just a temporary thing I might just work with changing the sprite sheet of the event for now.
For clarification: it's temporary in the sense of a move route command. The change is forgotten when the sprite is deleted, i.e. on scene change, which includes entering the pause menu (I'd forgotten about that - probably makes the script call approach pointless). In theory it can also be overridden if something else changes that hue/tone/colour value.

I'm not aware of any core features that set hue, tone, or blend colour for map characters, but a plugin like Eli's would definitely interfere on some level. Obviously, though, the script calls I described would be redundant if you used that plugin.
I want to work without plugins as much as possible because I basically know nothing about coding and I'm afraid if I rely too much on plugins without getting to know the basics it wont be much help to me in the long run.
I'm not sure I get it. The whole point of plugins is you don't have to know coding - someone else has written it for you.

If you mean that you're learning JavaScript and want every modification to your game to be written by you...that's a valid choice, but it's going to make your project take a lot longer than it would if you use existing work.

If you mean that you want to make sure you understand how MZ works before you do a lot with plugins, that's smart, but then you wouldn't worry about trying to make your actual game during that process. You'd do practice projects following tutorials and such.

@caethyril Eli's plugin also uses the setHue() method, but at a cursory glance it looks like he made some structure for extra character properties that stores it, presumably to restore it when it would be reset. But I haven't used it.

Good luck with your project!
I'm not sure I get it. The whole point of plugins is you don't have to know coding - someone else has written it for you.
Getting to know the program, stepping into some javascript left and right, following and more important understanding certain tutorials is quite a lot. I don't want to make things more complicated with delving into someone elses plugins so I ignored them for now.

When I experiment with the colour change I keep that thing in mind. Appreciate the insight.
I don't know why you'd be delving into plugin code unless you want to edit it or adapt a feature it uses for a different use. I know basic scripting but I also use a lot of plugins because I would never get any actual work done on my game if I had to research and write them myself. I also have dozens of patches I've written for those plugins for myself or people here and just doing those patches takes all my time.
Avoiding scripting in general is probably a good idea while you're still learning the basics. For things that can't be done without scripting, a plugin that does what you want is usually the best option.

@ATT_Turan - yea, when I said Eli's plugin would interfere, I just meant it would be doing the same things (likely in better ways). Eliaquim makes some great stuff, I wasn't trying to make it sound bad. 😛
I wasn't trying to make it sound bad. 😛
Oh no, you didn't! I was just doing some rudimentary confirmation that work had been done to make the hue change persistent.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-tone-the-colour-of-sprites-used-by-events.162581/