Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
test
README.md
alpha.js
hue.js
index.js
inputs.js
saturation.js
style.scss
utils.js

README.md

ColorPicker

Accessible color picker.

Parts of the source code were derived and modified from react-color, released under the MIT license.

Usage

import { ColorPicker } from '@wordpress/components';
import { withState } from '@wordpress/compose';

const MyColorPicker = withState( {
	color: '#f00',
} )( ( { color, setState } ) => {
	return (
		<ColorPicker
			color={ color }
			onChangeComplete={ ( value ) => setState( value.hex ) }
			disableAlpha
		/>
	);
} );