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

> The ColorField component of @salmonui/inputs/color-picker: A text field for a color: accepts hex, rgb() and hsl() text and parses it on blur or Enter (parseColor); text that does not parse is reverted. Shows the value in valueFormat, a swatch preview and the shared field parts. A hidden input with name submits the value.

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

```ts
import { ColorField } 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: component

```ts
function ColorField(props: ColorFieldProps): ReactNode;
```

A text field for a color: accepts hex, `rgb()` and
`hsl()` text and parses it on blur or Enter (`parseColor`); text that
does not parse is reverted. Shows the value in `valueFormat`, a swatch
preview and the shared field parts. A hidden input with `name` submits the
value.

Props: [`ColorFieldProps`](https://salmonui.dev/docs/reference/inputs/color-picker/ColorFieldProps) (its members are the props)
