> For the complete documentation index, see [llms.txt](https://tigriweb.gitbook.io/components/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tigriweb.gitbook.io/components/meta/color.md).

# Color

[TwebMetaColorControl](https://github.com/tigriweb/components/blob/master/meta/TwebMetaColorControl.js)

<div align="left" data-full-width="false"><figure><img src="https://870798947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWAokPCWM65E5XQJVixgi%2Fuploads%2FFzfTvl9FgkTX4Unakty7%2Fcolor-button.jpg?alt=media&amp;token=0422e9dc-2eec-4020-92bf-8a4e57f9f82c" alt=""><figcaption></figcaption></figure></div>

![](https://870798947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWAokPCWM65E5XQJVixgi%2Fuploads%2FnuXWTxfDQR80pJw7iZUQ%2Fcolor-button-popover.jpg?alt=media\&token=f662297f-51b4-4f09-af43-581ae11f13da)

<details>

<summary>{ label, help, metaKey* }</summary>

```jsx
/**
 * @param {string} [label] - Component label.
 * @param {string} [help] - Component description.
 * @param {string} metaKey - Registered meta key from register_post_meta().
 */
```

</details>

{% code title="functions.php" overflow="wrap" %}

```php
register_post_meta( 'post_type_name', 'test_color', array(
	'type'         => 'string',
	'default'      => '',
	'single'       => true,
	'show_in_rest' => true,
) );
```

{% endcode %}

{% code title="index.js" overflow="wrap" %}

```jsx
import {
	TwebMetaColorControl,
} from '@tigriweb/components/meta';
```

{% endcode %}

{% code title="index.js | PanelBody" %}

```jsx
<TwebMetaColorControl
	label={ __('Color Label', 'your-theme-name') }
	metaKey="test_color"
/>
```

{% endcode %}
