Chill yazdıBut maybe i did it wrong, because i just tried to replace the color.
How exactly did you replace the color? Please note that the shader code will need to handle the "transition texels" as well where e.g. the black outline and yellow trouser regions meet, there they mix e.g. 50/50 to a darker brown tone in some texels. If you only replace exact 100% color matches of black and yellow you will get jaggy staircase artifacts (similar to antialiasing artifacts) where your colors meet.
In the shader code you would then calculate the color distance of the tested texel to your classification color (e.g. yellow for trousers) and then apply your replacement colors with the respective weights. The color distance can either be calculated as distance in RGB space, or in a hue-based color space such as YCoCG or YUV if RGB does not separate your parts cleanly. You might also get away by just calculating the hue distance and (if it's close enough) replace the hue with the replacement color's hue. This way you could leave the black outline as-is and just cycle the color hue of trousers, shirt and body around.
A different, much simpler solution would be to prepare the input textures so that you don't have any unclear texels that don't match the colors to begin with.
So the linked mesh approach would be cleaner for me, but my problem is that linked meshes are bound to one slot. Which means only one mesh can be visible at a time, but i need all three visible at once
Oops, sorry, my fault - admittedly I haven't thought this through!