Replacing color in RGBA texture makes it grayscale

Hi. I am trying to replace a selected color in a texture using the replace color node using the simple graph below. However you can see the texture loses it color. I suspect the problem is trying to convert the RGB to RGBA using the Vector4 node, but I may be wrong.

Any way to fix this. Thanks.

The problem is you plug vector3 to vector1(float)it will be truncate to vector1(float), which is R channel.
So XYZ component that you plug into is always from R channel.
You can split output from Replace Color node then plug RGB to Vector4 node’s XYZ component.
6972302--822074--replace.jpg