# parseColor (@salmonui/inputs/color-picker)

> The parseColor function of @salmonui/inputs/color-picker: Parses #rgb, #rgba, #rrggbb, #rrggbbaa, rgb() / rgba() and hsl() / hsla() (comma or space syntax, percentages, deg) and transparent. Throws a TypeError for anything else; use the result's toString(format) to convert.

Canonical: https://salmonui.dev/docs/reference/inputs/color-picker/parseColor

```ts
import { parseColor } from '@salmonui/inputs/color-picker';
```

Entry index: https://salmonui.dev/docs/reference/inputs/color-picker (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/inputs/color-picker.md).

## Reference

Kind: function

```ts
function parseColor(value: string): Color;
```

Parses `#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`, `rgb()` / `rgba()` and
`hsl()` / `hsla()` (comma or space syntax, percentages, `deg`) and
`transparent`. Throws a `TypeError` for anything else; use the
result's `toString(format)` to convert.
