Is there a function that would satisfy the following conditions?:
$\forall x \in X, x = f(f(x))$ and $x \not= f(x)$,
where the set $X$ is the set of all triplets $(x_1,x_2,x_3)$ with $x_i \in \{0,1,\ldots,255\}$.
I would like to find a function that will have as an input RGB color values (triplets) and return the original color after two applications of the function.
$f(x_1,x_2,x_3)=(255−x_1,255−x_2,255−x_3)$ should do the work.