---
title: "Color Spectrum Plot"
---

### Description

Interfacing the [colorspace.specplot.specplot](colorspace.specplot.specplot.qmd) function.
Plotting the spectrum of the current color palette.

### Usage

<pre><code class='language-python'>divergingx_hcl.specplot(n=180, *args, **kwargs)</code></pre>

### Arguments

<dl class="pyp-list param-list">
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.palettes.divergingx_hcl.specplot:n">n</code><code class="argument-class">int</code>
  </dt>
 <dd>Number of colors, defaults to 180.</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.palettes.divergingx_hcl.specplot:*args">*args</code>
  </dt>
 <dd>Forwarded to [colorspace.specplot.specplot](colorspace.specplot.specplot.qmd).</dd>
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.palettes.divergingx_hcl.specplot:**kwargs">**kwargs</code>
  </dt>
 <dd>Forwarded to [colorspace.specplot.specplot](colorspace.specplot.specplot.qmd).</dd>
</dl>

### Examples

```{python}
#| echo: true
#| warning: true
#| error: true
# Default diverging HCL palette
from colorspace import diverging_hcl
pal = diverging_hcl()
pal.specplot()
```

```{python}
#| echo: true
#| warning: true
#| error: true
pal.specplot(rgb = True)
```

```{python}
#| echo: true
#| warning: true
#| error: true
# Default sequential HCL palette
from colorspace import sequential_hcl
pal = sequential_hcl()
pal.specplot(figsize = (8, 4))
```

```{python}
#| echo: true
#| warning: true
#| error: true
# Default qualitative HCL palette
from colorspace import qualitative_hcl
pal = qualitative_hcl()
pal.specplot(figsize = (8, 4), hcl = False, rgb = True)
```



