Finding $4$ variables using $3$. if I have:

$ x=\dfrac{a-.5b-.5c+.25d}{a+b+c+d}$

$ y=\dfrac{\dfrac{b\sqrt{3}}{2}+\dfrac{c\sqrt{3}}{2}+\dfrac{d\sqrt{3}}{4}}{a+b+c+d}$

$ z=a+b+c+2d $

Then how do I get back to:

$ a= $ , $ b= $ , $ c= $ , and $ d= $ ?

When there is a divide by zero error, $ x=0 $ and $ y=0 $.

When
 $(a,b,c,d)=(e,e,0,0)$ and $e<>0$
 then
 $(x,y,z)=(.25,\dfrac{\sqrt{3}}{4},2e)$
 but also when
 $(a,b,c,d)=(0,0,0,e)$ and $e<>0$
 then
 $(x,y,z)=(.25,\dfrac{\sqrt{3}}{4},2e)$
 again.  So, everytime
 ($a=b$  and  $c=0$)
 then
 $(a,b,0,0)=(0,0,0,a+b)$.

$x>=-.5$
$x\leq1$
$y\geq\dfrac{\sqrt{3}}{2}$
$y\leq-\dfrac{\sqrt{3}}{2}$
$z\geq0$
$z\leq765$ this could mathematically be up to $1020$ but will be always be $\leq 765$, because $a+b+2d \leq 510$.
$a\geq0$
$b\geq0$
$c\geq0$
$d\geq0$
$a\leq255$
$b\leq255$
$c\leq255$
$d\leq255$

$a$, $b$, $c$, and $d$ are all integers.

I can find $a$, $b$, and $c$, when I don't use $d$. but I would like to find what the highest $d$ value can be; while $a$, $b$, and $c$ are between or equal to $0$ and $255$.

When $d=0$, I get the formulas I want:

$a=\dfrac{z}{3}(2x+1)$

$b=\dfrac{z}{3}*(\sqrt{3}y-x+1)$

$c=-\dfrac{z}{3}(x+\sqrt{3}y-1)$

$d=0$

When $θ$ of $(x,y)$ from $(0,0)$ is $60°$ then only $d$ exists.

When $θ$ of $(x,y)$ from $(0,0)$ is between $-120°$ and $60°$ then only $a$,$c$, and $d$ exists.

When $θ$ of $(x,y)$ from $(0,0)$ is between $60°$ and $240°$ then only $b$,$c$, and $d$ exists.

When $θ$ of $(x,y)$ from $(0,0)$ is $240°$ (aka $-120°$) then only $c$ exists.

But I'd like the highest $d$ value; not lowest.
note: $atan(\dfrac{y}{x})$.
 A: Usually you can't :
The system can be rewritten as 
$$x(z-d) - \frac{d}{4} = a - \frac{b}{2} - \frac{c}{2}$$
$$y(z-d) - \frac{d\sqrt{3}}{4} = \frac{b\sqrt{3} }{2} - \frac{c\sqrt{3}}{2}$$
$$ z-2d = a+b+c$$
This can be seen as a linear system with unknown $a$,$b$ and $c$, and it's not hard to show that that this system has an unique solution for every value of $d$
A: Hints: You can't get back $b$ and $c$ individually, but you can solve for $a$, $d$, and $e\equiv b+c$ as follows: transform your system into
\begin{align*}
(a+e+d)x&=a-0.5e+d\\
(a+e+d)y&=\frac{\sqrt{3}}{2}e+\frac{\sqrt{3}}{4}d\\
z&=a+e+2d
\end{align*}
which can be further written as
$$
\begin{pmatrix}
x-1& x+0.5&x-1\\
y&y-\sqrt{3}/2&y-\sqrt{3}/4\\
1&1&2
\end{pmatrix}
\times
\begin{pmatrix}
a\\ e\\d
\end{pmatrix}
=
\begin{pmatrix}
0\\ 0\\z
\end{pmatrix}\cdot
$$
Edit: call the $3\times 3$ matrix on the LHS above $A$. Then your answer is
$$
\begin{pmatrix}a \\ e \\ d\end{pmatrix}=A^{-1}\begin{pmatrix}
0\\ 0\\z
\end{pmatrix}\cdot
$$
In fact, if you use $A^{-1}=\text{adj}(A)/\det(A)$, you only need to compute the last column of $A^{-1}$.
