# JavaScript (ES6), <s>53</s> 52 bytes

_Saved 1 byte thanks to @tsh_

Takes input as 3 distinct parameters: `(Color, From, To)`.

<!-- language-all: lang-javascript -->

 (C,F,T)=>T.replace(/\w/g,(x,i)=>C[F.search(x)-~i%2])

[Try it online!](https://tio.run/##bc1PC4IwGMfxe69CkHCD6fBP6cVgc7r78FYdxKYZ4kSjPPXWLZOIsOP34cfnuWS3rM@7qr2ajTrJsQhHEKEEpTDcpVYn2zrLJcCHOy4RGFD1Okf7xOpl1uVnMEDzUa2dIxxz1fSqllatSlAAQ7cd19ts/cBAmqELwTmlhLyDkDkNCDWMNd0P5u1qQRCHupHH/hGUci7Eh/CYGznUJguCxYTROE5@H08xa19iWk3r8Qk "JavaScript (Node.js) – Try It Online")