title: Python: Altair Condition Color Opacity
body: <p>In an Altair condition I want to specify the opacity for the the secondary conditional color.
  My data in the scatter are fairly dense so I want the unselected points to go away (more or less).</p>
  <p><a href="https://altair-viz.github.io/user_guide/interactions.html#selection-targets-fields-and-encodings" rel="nofollow noreferrer">Using the example from here</a>, I want this code:</p>
  <pre class="lang-py prettyprint-override"><code>selection = alt.selection_multi(fields=['Origin'])
  color = alt.condition(selection,
                     alt.Color('Origin:N', legend=None),
                     alt.value('lightgray') # WANT THIS TO BE %50 OPACITY
  )
  
  scatter = alt.Chart(cars).mark_point().encode(
   x='Horsepower:Q',
   y='Miles_per_Gallon:Q',
   color=color,
   tooltip='Name:N'
  )
  
  legend = alt.Chart(cars).mark_point().encode(
   y=alt.Y('Origin:N', axis=alt.Axis(orient='right')),
   color=color
  ).add_selection(
   selection
  )
  
  scatter | legend
  </code></pre>
  <p>to have the color condition be like:</p>
  <pre><code>color = alt.condition(selection,
                     alt.Color('Origin:N', legend=None),
                     alt.Color(value='lightgray', opacity=0.5)
  )
  </code></pre>
  <p>However I can't seem to figure it out and there doesn't appear to be any solution online.</p>
  <p>Thanks!</p>