If you are doing these calculations on a computer and can get away from insisting on interpreting $x_1$, $x_2$, $x_3$ as integers in the range $[0,255]$, consider thinking of $x_1$, $x_2$, $x_3$ as eight-bit bytes or vectors of length $8$ over $\mathbb F_2$ to be a bit more formal about it. Then, for any three bytes $a$, $b$, $c$ with at least one being nonzero, $f(x_1, x_2, x_3) = (x_1\oplus a, x_2\oplus b, x_3\oplus c)$ has the desired properties that $\begin{align*} f(f(x_1, x_2, x_3)) &= f(x_1\oplus a, x_2\oplus b, x_3\oplus c)\\ &= (x_1\oplus a\oplus a, x_2\oplus b\oplus b, x_3\oplus c \oplus c)\\ &= (x_1, x_2, x_3), \end{align*}$ and $(x_1, x_2, x_3) \neq f(x_1, x_2, x_3)$. As an added bonus (not necessarily important to math.SE readers), the XOR operation on bytes is a machine-language instruction on most computers and in some cases can be faster than the ADD instruction which is often defined for full (multiple-byte) words only.
Note that $f(x_1,x_2,x_3)=(255−x_1,255−x_2,255−x_3)$ as suggested by @ofer is just $f(x_1,x_2,x_3) = (x_1 \oplus \mathbf 1, x_2\oplus \mathbf 1, x_3\oplus \mathbf 1)$ where $\mathbf 1 = (1,1,1,1,1,1,1,1)$ is the eight-bit all-ones byte.