title: Using IF Statements And Toggle to Clean Up TradingView Indicator?
body: <p>I have a toggle at the top of my indicator where I determine if I'm using a Light or Dark Color Theme:</p>
  <pre><code>toggleDarkColors = input.bool(true, title = &quot;Toggle Dark Colors&quot;, group=g2)
  toggleLightColors = input.bool(false, title = &quot;Toggle Light Colors&quot;, group=g2)
  </code></pre>
  <p>Colors:</p>
  <pre><code>londonTradingWDColor = color.new(#66d9ef, 99) //  Dark
  londonTradingWLColor = color.new(#66d9ef, 93) //  Light
  </code></pre>
  <p>I use the colors above to display my trading window on my chart:</p>
  <pre><code>LondonTW = input(title='London Trading Window', defval=true, group=g6)
  londonTradingWindow = toggleTradingWindow and is_session(londonTradingW)
  bgcolor(toggleDarkColors and londonTradingWindow and LondonTW ? londonTradingWDColor : na)
  bgcolor(toggleLightColors and londonTradingWindow and LondonTW ? londonTradingWLColor : na)
  </code></pre>
  <p>The 2 issues I'm having is when I click on the &quot;Style&quot; menu in the indicator settings:</p>
  <p><a href="https://i.stack.imgur.com/50cRA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/50cRA.png" alt="enter image description here" /></a></p>
  <p><strong>#01</strong></p>
  <p>I have 2 checkboxes with &quot;Background Color&quot; displaying because I have 2 bgcolor()'s above.
  Is there any way to dislay only 1 instead of 2 depending on which Color theme is toggled? I tried if statements:</p>
  <pre><code>LondonTW = input(title='London Trading Window', defval=true, group=g6)
  londonTradingWindow = toggleTradingWindow and is_session(londonTradingW)
  
  LOTWDark = bgcolor(londonTradingWindow and LondonTW ? londonTradingWDColor : na)
  LOTWLight = bgcolor(londonTradingWindow and LondonTW ? londonTradingWLColor : na)
  
  if toggleDarkColors
      LOTWDark
      
  if toggleLightColors    
      LOTWLight
  </code></pre>
  <p>I got the error: <code>line 551: Void expression cannot be assigned to a variable</code>
  Line 551 is <code>LOKZDark = bgcolor(londonOKillZone and LondonOKZ ? londonOpenKZDColor : na) </code></p>
  <p><strong>#02</strong></p>
  <p>How do I alter the <code>bgcolor()</code> above code to give it a title? I checked <code>bgcolor()</code> on tradingviews pinescript v5 page and I couldn't figure it out.</p>
  <p>Any suggestions?</p>