# qualpal.get\_palette

Python · 1.1.0

[Source](<https://github.com/jolars/qualpal-py/blob/72a59d3a05195fb48e82e53ededa466950ed7d67/qualpal/utils.py>)

```python
get_palette(name: str) -> qualpal.Palette
```

Get a specific named color palette.

<a id="parameters"></a>

## Parameters

**name** : *str*

Palette name in format “package:palette” (e.g., “ColorBrewer:Set2”).
Use `list_palettes()` to see available options.

<a id="returns"></a>

## Returns

*Palette*

A Palette object containing all colors from the named palette.

<a id="raises"></a>

## Raises

`ValueError`

If palette name is not in “package:palette” format.

`RuntimeError`

If palette name is not found or cannot be loaded.

<a id="examples"></a>

## Examples

```python
>>> from qualpal import get_palette
>>> palette = get_palette("ColorBrewer:Set2")
>>> len(palette)
8
>>> palette[0].hex()
'#66c2a5'
```

```python
>>> # Display the palette
>>> palette.show()  # doctest: +SKIP
```
