2 of 5 ':0' instead of '0'

Thanks to @Ignacio Vazquez-Abrams and @Jeff Schaller, I realized that $DISPLAY was the enviormental variable I needed. If you are in a display server the value held by $DISPLAY will be 0. Hence, the following code works--

if [[ $DISPLAY ==':0' ]]
    PROMPT = (etc)
else 
    PROMPT = (etc2)
fi

Thanks to all.