Can someone help me recolor character (or advice a good color swap program)?

There is a character in the attachments. I need to change her colors to match portrait (first from the left, it is not visible by defaul, click on image to expand), clothing and hair.

Usually i do this via "replace color" function in photoshop. It works fine with normal RM characters, but with this one something is wrong. Maybe due to different drawing style, at least that is what my friend suggested. When i try to replace color, two things happen - first, entire character changes instead of selected item (clothing, for example), second, instead of black color appears something like dark brown, despite me clearly selecting the black one.

This is the first time i encounter such problem and i don't know what to do with it. So if someone can suggest me the better tool to do the recolor (but it must keep the shades, and not just place single color everywhere) - please tell. Would be also interesting if someone could explain why this problem occurs.

Otherwise, i hope that someone can help me do the recolor please, because i fail to do it manually - the shades are big problem for me, for some reason no matter what colors i pick it is either looking monotone, or too different to look good.

Oh, and the character is from limezu modern interiors set character generator, edits are allowed.
A lot of the pixels are 'neutral' in tone, and photoshop will pick up mostly everything on a hue shift, even through selective colour edit.

To ensure I'm understanding, you want the sprite to match the human portrait? (blonde hair, turquoise top?)

How I would do it: (and did) I made some layers on the sprite, so you can easily recolour such as the hair, skin tone, top, bottoms, shoes etc. With pixel art it's not too hard to pick out the parts you want to change, and paste them in as a fresh layer. Then you can edit using hue/saturation(and colourize) All photoshop. I'm sure Gimp has same stuff in their toolkit 😉

I had to zip the attached as the forums don't allow attaching psd files 🙂

edit: messed up a layer, fixed it. Also attached example with recolouring two layers
To ensure I'm understanding, you want the sprite to match the human portrait? (blonde hair, turquoise top?)
Yes, but wrong portrait - i mentioned first from the start, the brunette one. But it was my fault, i did not expect the forum to cut it like that so full image will be visible only after click.

Anyway, layer idea is great, looks like it can really solve the problem. And not only this, but also help me in the future with simillar issues. Thank you for the great solution!

But another problem still remains - when i select black color to replace current one, it makes clothing brown for me. And i don't understand why...
1760248808660.png

Original thread: https://forums.rpgmakerweb.com/threads/can-someone-help-me-recolor-character-or-advice-a-good-color-swap-program.180491/