Normally in graphics, you interpolate values across a line like so:

Point $A$ has value $V_A$ and point $B$ has value $V_B$, then you want to blend the value/color linearly between them as $C$ moves between $A$ and $B$. To do this, you first calculate the ratio (or percentage) of how far $C$ lies across the line $\overline {AB}$. This is equal to $\overline{AC}$ over $\overline {AB}$. Thus the ratio is calculated as follows:
$$
t=\frac {(C-A)}{(B-A)}
$$
Once you have this ratio, you can use it to find the interpolated value between $V_A$ and $V_B$, since they should have the same ratio.
$$
t=\frac {V_C - V_A}{V_B - V_A}
$$
The unknown variable here is $V_C$, so solving for $V_C$:
$$
(V_B - V_A)t=V_C-V_A\\
V_C=(V_B - V_A)t+V_A
$$
However, this assumes that point $C$ lies on the line $\overline {AB}$. If it is not on the line, then you can't really "interpolate" in this way without some additional definition of what you want to interpolate. For example, if $C$ lies far below the line, then you can't really compare $\overline {AC}$ to $\overline {AB}$ like this; the ratio can be greater than 1, even though $C$ is "in between" them. So in your example, point $(2,3)$ is off the line. You have many possible variants.
For instance:
- You can interpolate between the distances of $\overline {AC}$ and ${BC}$. You would thus create a new straight line, $\overline {ACB}$ (even though in the graph it would be an angle) and do the above interpolation on that.
- You can interpolate a particular color to a dimension. For example, you take the values $A_x$, $B_x$ and $C_x$, and interpolate $\overline {A_xC_x}$ over $\overline {A_xC_xB_x}$, and use that for Red, then use $y$ for Green etc. However this works better for 3 dimensions, where each dimension can correlate to a color.