0.0
No commit activity in last 3 years
No release in over 3 years
Integrate with kolor-picker to provide color picker and form helper.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

 Project Readme

kolor-picker-rails

Build Status Coverage Status

Integrate with kolor-picker to provide color picker and form helper.

Installation

Add this line to your application's Gemfile:

gem 'kolor-picker'

And then execute:

bundle

Or install it yourself as:

gem install kolor-picker

Usage

Require Javascript

Make sure you required jQuery and add the following to /app/assets/javascripts/application.js:

//= require kolor-picker

Require CSS

Add the following to /app/assets/stylesheets/application.css:

/*
 *= require kolor-picker
 */

Helpers

You can use colorpicker_tag and colorpicker.

<%= colorpicker_tag(name, default_color, kolor_picker_options, html_options) %>
<%= colorpicker_tag(:color, 'red', {:doRender => false}, {:class => 'color'}) %>
<%= colorpicker_tag(:color) %>

or form builder

<% form_for @item do |f| %>
<%= f.colorpicker(method, kolor_picker_options, html_options) %>
<%= f.colorpicker(:color, {:doRender => false}, {:class => 'color'}) %>
<%= f.colorpicker(:color) %>
<% end %>

License

The gem is available as open source under the terms of the MIT License.

Contact

The project's website is located at https://github.com/emn178/kolor-picker-rails
Author: Chen, Yi-Cyuan (emn178@gmail.com)