Skip to content

colorpicker in jQueryUI style, based on jPicker. Check the demo...

Notifications You must be signed in to change notification settings

cjboco/colorpicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery.colorpicker v0.5

Copyright (c) 2011 Martijn W. van der Lee
Licensed under the MIT.

Full-featured colorpicker for jQueryUI with full theming support.
Most images from jPicker by Christopher T. Tillman.
Sourcecode created from scratch by Martijn W. van der Lee.

IE support; make sure you have a doctype defined, or the colorpicker will not display correctly.

Note; this plugin is constantly changing, this file may be out of date.

alpha:			false
	Whether or not to show the inputs for alpha.
autoOpen: false
	If true, the dialog opens automatically upon page load.
	If false, dialog opens on click of selected element.
closeOnOutside:	true
	Close the window when clicking outside the colorpicker display.
color: '#00FF00'
	Initial color. Formats recognized are:
		#rrggbb
		rrggbb (same as previous, but without the #)
hsv:			true
	Whether or not to show the inputs for HSV.
mode: 'h'
	Determines the functionality of the map and bar components. Allowed values
	are; 'h', 's', 'l', 'r', 'g', 'b' or 'a', for hue, saturation, luminosity,
	red, green, blue and alpha respectively.
title: 'Pick a color'
	Title to display in the header.

onChange:		null
onClose:		null
	Events trigger on each change, confirmation (click on OK button) and
	cancellation (click on Cancel, outside window or window close button)
	respectively.
	Note that onChange may be triggered in rapid succession when dragging the
	mouse accross the map or bar and may be triggered without a change in color
	upon specific user interactions.
rgb:			true
	Whether or not to show the inputs for RGB.
swatches:		null
	'undefined' to show swatches of HTML colors or provide your own object
	with colornames and [r,g,b] array.
	For example { 'red': [ 255, 0, 0 ], 'blue': [0, 0, 255] }

parts:			''
	Determine which parts to display.
	Use any of the preset names ('full', 'popup' or 'inline') or specify
	an array of part names (i.e. ['header', 'map', 'bar', 'hex', 'inputs',
	'preview', 'swatches', 'footer']). If an empty string is given, the parts
	will be automatically chosen as preset 'popup' or 'inline' depending on
	the context in which the colorpicker is used.

layout:
	Set the position of elements in a table layout.
	You could create any layout possible with HTML tables by specifying cell
	position and size of each part.
	@todo document how this works.

duration:		'fast'
showAnim:		'fadeIn'
showOptions:	{}
	Set the effect to use when opening or closing the dialog.
	Same as standard jQueryUI datepicker.

limit:			''
	Limit the selectable colors to any of the predefined limits:
		''			No limitations, allow 8bpp color for a palette of all
					16 million colors.
		'websafe'	Set of 216 colors composed of 00, 33, 66, 99, cc and ff
					color channel values in #rrggbb.
		'nibble'	4 bits per color, can be easily converted to #rgb format.
					The palette is limited to 4096 colors.
		'binary'	Allow only #00 or #ff as color channel values for primary
					colors only; only 8 colors are available with this limit.

About

colorpicker in jQueryUI style, based on jPicker. Check the demo...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%