Is this a color replace effect bug or am i doing something wrong?

Hello Everyone,

I want to randomize the color of the animals in my game but i want to remain some parts of them unchange (nose, eyes and etc). so i tried to use the color replace effect for color swapping:

But for some reason it only outputs a different shades of green and blue despite the different range of R;G;B

how do i fix this?

The forum only lets me to put only one media in a post, so i’ll just put the preview here for anyone to see:

Record_2023_10_23_14_12_44_273

effect screenshot:

So your issue is that the reds aren’t displaying?

yes and because of it i can’t produce colors like yellow, purple, pink, brown and etc

Possibly it’s pure chance? I’m guessing red when added to the other colors produces more browns.

Test the code to have less values added to blue and green and see what happens.

If it works same as tint action then it is not replacing color but adding to existing color

So like if you have red cat you won’t be able to turn him into blue cat because no mix of colors with red will give you blue

BUT that is if it is working same as tint action

not really i have tried to do that but it keeps generating different shades of green and blue

There’s an extension that does this for you, it’s called Recolorizer. You can try it out.

Also your bear is grey, right (the base sprite). Should be a lighter grey for it to display hues well.

it works completely different, maybe i can upload the project so you guys can playtest it?

Oh wait, is this an effect you’re using? Maybe it’s bugged. Why not just code it manually to change the colors, I don’t see why that won’t work. If you’re trying to get totally random colors just create a function to change the R, G, B variable and then have it manually adopt the hue of the new RGB number. Just make sure that your sprite is a lighter grey though.

yes, that’s what i’m trying to do you can see the screenshot of what my events look like, maybe you can show me a different approach to this?

maybe you guys want to try it, just incase: Download change palette.zip from Sendspace.com - send big files the easy way

I think if i use recolorizer or tint action, it would change all the colors of the sprite, i want to remain some colors unchange in this case the bear’s mouth part (brown color)

image

Recolorizer will only target specific colors and change them. Works decently at doing that last time I tried it.