title: How to choose seaborn boxplots color by hue
body: <p>I want to know how can I choose the color for a seaborn boxplot by hue.</p>
  <p>The current box plots I have
  <a href="https://i.stack.imgur.com/PTfVv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PTfVv.jpg" alt="Current box plots" /></a></p>
  <p>For example, I want to use RGB colors, blue for left, red for right.</p>
  <pre><code>sns.boxplot(x=&quot;S&quot;, y=&quot;data&quot;, hue=&quot;Side&quot;, data=dataset, showfliers=True)
  </code></pre>
  <h2>Solved</h2>
  <p>Following Alex's comment and added <code>palette={&quot;left&quot;: &quot;blue&quot;, &quot;right&quot;: &quot;red&quot;}</code> to the plot command I was able to solve the issue. If someone came here looking for the solution you can also check <a href="http://latexcolor.com/" rel="nofollow noreferrer">http://latexcolor.com/</a> and choose the color you want just by copying the value from the <strong>hex</strong> column instead of the color name.</p>