---
title: "Get Specific Palette Setting"
---

### Description

Returns one specific item of the palette settings,
e.g., the current value for `h1` or `l2`.
If not existing a `None` will be returned.

### Usage

<pre><code class='language-python'>terrain_hcl.get(key)</code></pre>

### Arguments

<dl class="pyp-list param-list">
  <dt style = "white-space: nowrap; font-family: monospace; vertical-align: top">
   <code id="colorspace.palettes.terrain_hcl.get:key">key</code><code class="argument-class">str</code>
  </dt>
 <dd>Name of the setting to be returned.</dd>
</dl>

### Return

None if `key` does ont exist, else the current value will be
returned.

### Examples

```{python}
#| echo: true
#| warning: true
#| error: true
# Exemplarily for rainbow_hcl (works for the
# other HCL palettes as well)
from colorspace import rainbow_hcl
a = rainbow_hcl()
a.get("h1")
```

```{python}
#| echo: true
#| warning: true
#| error: true
a.get("c1")
```

```{python}
#| echo: true
#| warning: true
#| error: true
a.get("l1")
```

```{python}
#| echo: true
#| warning: true
#| error: true
a.get("not_defined")
```



