No commit activity in last 3 years
No release in over 3 years
choices colour picker like twitter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0

Runtime

 Project Readme

Twitter::Colour::Picker

## Installation

1.Add gem 'twitter-colour-picker' to your Gemfile.

gem 'twitter-colour-picker'

2.And then execute:

    $ bundle install

Or install it yourself as(local):

    $ gem install twitter-colour-picker

Usage

Format Require
CSS *= require colour-picker
JS //= require colour-picker

choice color on controller :

#flat colors , source https://flatuicolors.com/
@colors = ["3097d1","1abc9c", "2ecc71","3498db","9b59b6","34495e","f39c12","d35400","c0392b","bdc3c7","7f8c8d","f1c40f"]

views:

<select id='theme_color' style="display:none;">
<% @colors.each do |color|%>
<option value="<%= color %>"><%= color %></option>
<% end %>
</select>

OR:

 <%= form.select(:theme_color, options_for_select(@colors, selected: 'user selected'),{},{:class=>"...",:id=>'theme_color',:style=>'display:none;'}) %>
<script>
$(document).ready(function(e){
$('#theme_color').colorpicker({
size: 35,
label: 'Theme Color: ',
hide: false
});
});
</script>

Contributing

For reporting bug, contact me on twitter

License

Copyright (c) 2015 Mohammad Mahmoudi.