A COPRL presenter plugin that provides color picker functionality. Use Javascript library from material-design-inspired-color-picker
Add this line to your application's Gemfile:
gem 'theme_color_picker_presenter_plugin', git: 'https://github.com/coprl/theme_color_picker_presenter_plugin', require: false
And then execute:
$ bundle
Declare the plugin in your pom, plugin :theme_color_picker
.
Coprl::Presenters.define(:my_pom) do
plugin :theme_color_picker
content do
theme_color_picker(:name, value: '#BBFF11')
end
end
You can optionally add a preview hash that includes section and set vars. f.e.
preview: { section: :primary_color_section, set_vars: %w(mdc-theme-primary mdc-theme-background)}
This will update the css vars in the defined section with the color returned by the picker
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the COPRL project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.