Railsify!

Colour Picker Form Helper

== Colour Picker Plugin ==

This plugin provides an HTML helper for selecting HEX COLOURS in forms.

== Usage ==

1. Install the plugin using

   ./script/plugin install http://svn.plasticrain.com/projects/plugins/colour_picker
   
2. Add the javascript include to your application layout (views/layouts/application.html.erb perhaps?)

   <%=javascript_include_tag 'colour_picker'%>
   
3. Add it to a form:


   <%form_for :post do |f|%>
      <%=colour_picker :post, :colour_code%>
   <%end%>
   
== Options ==

<%=colour_picker object, method, options = {}, button_options = {}%>

options[:use_swatch_icon] set to true will show a swatch icon insted of a button to display the colour picker.
button_options[:label] will change the text in the default button.

Last updated: December 29, 2007 17:40