<p dir="auto">I am using Python 3.8.10, seaborn 0.11.2</p>
<p dir="auto">As you can see in the code below, the color (in line_kws) did not render the KDE line. I mean the kde line should be in red instead of blue.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import seaborn as sns

x = np.random.normal(-1,1,1000)

fig, ax = plt.subplots(figsize=(10,10))
sns.histplot(x,kde=True,line_kws={&quot;color&quot;:&quot;red&quot;,&quot;linewidth&quot;:3})"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">seaborn</span> <span class="pl-k">as</span> <span class="pl-s1">sns</span>

<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">normal</span>(<span class="pl-c1">-</span><span class="pl-c1">1</span>,<span class="pl-c1">1</span>,<span class="pl-c1">1000</span>)

<span class="pl-s1">fig</span>, <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">10</span>,<span class="pl-c1">10</span>))
<span class="pl-s1">sns</span>.<span class="pl-en">histplot</span>(<span class="pl-s1">x</span>,<span class="pl-s1">kde</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,<span class="pl-s1">line_kws</span><span class="pl-c1">=</span>{<span class="pl-s">"color"</span>:<span class="pl-s">"red"</span>,<span class="pl-s">"linewidth"</span>:<span class="pl-c1">3</span>})</pre></div>
<p dir="auto">I was trying to give the distribution KDE a different color when I use sns.histplot(),</p>
<p dir="auto">Was thinking kde_kws = {'color': ...} would work, but it didn't.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sns.histplot(data=..., kde=True, kde_kws={&quot;color&quot;: 'r'})"><pre class="notranslate"><code class="notranslate">sns.histplot(data=..., kde=True, kde_kws={"color": 'r'})
</code></pre></div>
<p dir="auto">File ".../Python-library/seaborn/distributions.py", line 1422, in histplot<br>
p.plot_univariate_histogram(<br>
File ".../Python-library/seaborn/distributions.py", line 414, in plot_univariate_histogram<br>
densities = self._compute_univariate_density(<br>
File ".../Python-library/seaborn/distributions.py", line 283, in _compute_univariate_density<br>
estimator = KDE(**estimate_kws)<br>
TypeError: <strong>init</strong>() got an unexpected keyword argument 'color'</p>