title: How do I format my zsh prompt based on a condition?
body: <p>I'm using the answer given here: <a href="https://stackoverflow.com/questions/6159856/how-do-zsh-ansi-colour-codes-work">How do zsh ansi colour codes work?</a> to format and add color to my zsh prompt.</p>
  
  <p>Is there any way to format the prompt based on some conditions?</p>
  
  <p>For example, if the hostname has the word <code>PROD</code> in it, then I'd like my prompt to have a red background. Otherwise, I'd like no background, and bold green text.</p>