Replace Color node is broken

This screenshot speaks for itself, I think. The From color in the Replace Node in Shader Graph was chosen by eyedropper-ing a big chunk of the character sprite’s purple cloak. As you can see, absolutely none of it is replaced with neon green.

(Note: I can get parts of the cloak to start turning green if I up the Range value, but it starts with the wrong color, replacing a lighter shade than the one specified in From!)

Works fine for me. It’s all about setting up the right From/Range/Fuzziness values.
6638326--757486--upload_2020-12-19_0-27-35.png

But since it works based on distance between colors in RGB color space, the results may not be very intuitive, and especially since you want to replace colors of varying hues and lightness, not entirely desirable. For replacing colors in this particular case I would recommend using a separate texture as a mask to select the exact areas for color replacement.

You can also try a setup like this to replace colors based only on hue, it’s simpler than making a separate mask, but it still may not always produce the desired results.

2 Likes

Yeah–turns out, I was still using a version of URP where this node type was simply broken. Updating Unity fixed the issue.

which version of unity works?
(it’s like a treasure hunt)

I’m using 2020.2.0f1 and it works in that!

Note: you’ll also have to update the URP, most likely.