inputEx - ColorPickerField Usage

This field is a wrapper around the YUI ColorPicker widget.

Basic ColorPickerField creation

Use the following code to create a basic inputEx ColorPickerField.

			new Y.inputEx.ColorPickerField({parentEl: 'container1', label: 'Choose a color', description: 'Click to view the available colors' });
		

Smaller ColorPickerField

Use the following code to create a ColorPickerField without controls

			var field = new Y.inputEx.ColorPickerField({parentEl: 'container2', label: 'Choose a color', value:'#2626AF', colorPickerOptions:{showcontrols:false} });
			
			// Register the 'updated' event and log the value to the page
			var logDiv = inputEx.cn('div', null, null, "Log :");
			Y.one('#container2').appendChild(logDiv);
			field.on('updated',function(val) {
				logDiv.appendChild( inputEx.cn('div', null, null, "Updated at "+(new Date())+" with value: "+val) );
			});