This gem is Rails integration for Bootstrap Colorpicker. It includes simple_form input for Colorpicker.
Note: This gem doesn't include Bootstrap itself, it inludes only Bootstrap Colorpicker. You can get Bootstrap here
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install bootstrap_colorpicker_rails
Add stylesheet file to app/assets/stylesheets/application.css.scss
//= require bootstrap-colorpicker
colorpicker() with any selector.
There are some options you can pass to
colorpicker(). They are documented at http://mjolnic.github.io/bootstrap-colorpicker/
Using with simple_form
simple_form input which you can apply via
as: :colorpicker option.
<%= f.input :color, as: :colorpicker %>
Note: For simple_form version < '3.1.0' use this gem version '0.1.1'
- Fork it ( https://github.com/ShPakvel/bootstrap_colorpicker_rails/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request
This gem is licensed under the MIT License.
Bootstrap Colorpicker itself is licensed under the Apache License, Version 2.0.