Suppose I have a formula
$$f(x) = x,$$
where $0 \leq x \leq 255$
Now I want to have a formula
$$f(x) = y,$$
where $0 \leq x \leq 255$, where $f(0) = 0$, $f(255) = 255$ and e.g., $f(128) = 150$ (the value of $150$ might vary).
All other values should be interpolated.
So actually I want a function that is nonlinear (starts with $0$ and goes up to $255$, starting increasing fast and finishes increasing slow); opposite as a parabolic function.
What (kind of) function should I use?