deprecated-addons/dav/colorpicker
Tobias Diekershoff 31520f804d moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
..
README.md moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
arrow.gif moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
arrow.png moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
colorPicker.css moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
demo.html moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
jquery.colorPicker.js moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
jquery.colorPicker.min.js moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00
screenshot.png moved deprecated communityhome, dav and yourls to the deprecated-addons repository 2018-06-02 11:23:11 +02:00

README.md

Really Simple Color Picker

This is a very minimal, yet robust Color Picker based on jQuery.

For more details check the introductory blog post - http://laktek.com/2008/10/27/really-simple-color-picker-in-jquery/

Usage

You can either clone this repo or download the latest build as a zip from here - http://github.com/laktek/really-simple-color-picker/zipball/master

Color Picker requires jQuery 1.2.6 or higher. Make sure to load it before Color Picker (there's no other dependencies!). For default styles of the color picker load the CSS file that comes with the addon.

  <script language="javascript" type="text/javascript" src=jquery.min.js"></script>
  <script language="javascript" type="text/javascript" src="jquery.colorPicker.min.js"/></script>

  <link rel="stylesheet" href="colorPicker.css" type="text/css" />

Add a text field to take the color input.

  <div><label for="color1">Color 1</label> <input id="color1" type="text" name="color1" value="#333399" /></div>

Then call 'colorPicker' method on the text field when document loads.

  <script language="javascript">
    jQuery(document).ready(function($) {
      $('#color1').colorPicker();
    }
  </script>

Options

There are several options you can set at the time of binding.

Selected color

Color Picker will use the value of the input field, which the picker is attached to as the selected color. If not, it will use the color passed with pickerDefault property.

  $('#color1').colorPicker({pickerDefault: "ffffff"});

Color Palette

Overrides the default color palette by passing an array of color values.

  $('#color1').colorPicker({colors: ["333333", "111111"]});

Transparency

Enable transparency value as an option.

  $('#color1').colorPicker({transparency: true});

If you want to set an option gloablly (to apply for all color pickers), use:

  $.fn.colorPicker.defaults.colors = ['151337', '111111']

Demo

Demo can be found at http://laktek.github.com/really-simple-color-picker/demo.html

Real-world Examples

Let us know how you are using Really Simple Color Picker...

Contributors

Issues & Suggestions

Please report any bugs or feature requests here: https://github.com/laktek/really-simple-color-picker/issues