Articles of color picker

How to overwrite iris color pallates from theme to plugin

I am working n plugin for iris color pick and in plugin I want to make my own color pallets and overwritten on iris color picker that use in theme. I create 6 fields in plugin where user can put their color hex codes and when user save them, then they overwritten automatically on pallets […]

How To Make Iris Color Picker Showed Up Over Form and Text?

Is there a way to make wordpress default color picker (iris) showed up over form and text using wordpress api? Its inline display messing up the administration page of my plugin each time the color picker box showed up.

Unset color set in Theme Customizer

I’m building a theme using the Theme Customizer and have a few options with color pickers. It seems as though once you set a color using the color picker, there’s no way to clear/remove/ unset it, is that right? If you haven’t saved your settings yet, you can hit the cancel button (though you’d lose […]

Vanderlee jQuery color picker and WordPress Errors

Has anyone gotten the Vanderlee jQuery color picker to work with WordPress? I’m evaluating color pickers with alpha support for my theme and this one just refuses to work. Originally I must have been loading the script too early because it was throwing this error: TypeError: ‘undefined’ is not a function (evaluating ‘$(‘.my-color’).colorpicker()’) I […]

Using color picker in plugin, does input attribute order matter?

I’m trying to use the WP color picker in a plugin admin menu and it doesn’t seem to be doing anything at all. I’m following the directions here: This is how it is setup: cbs-admin-menu.php: add_action( ‘admin_enqueue_scripts’, ‘mw_enqueue_color_picker’ ); function mw_enqueue_color_picker( $hook_suffix ) { // first check that $hook_suffix is appropriate for your admin […]

color value of wpColorPicker

I have following input field which is attached with color picker <input type=”text” class=”color-field” id=”mn_fpl_colorbackconf” rows=”1″ cols=”25″></textarea> Also I have the following line in JS script jQuery(‘body’).on(‘click’, ‘.color-field’, function() { jQuery(‘.color-field’).wpColorPicker(); } I have a small JS function jQuery(‘#editfont_button’).on(‘keyup’, ‘#mn_fpl_colorbackconf’, function() { sel = jQuery(‘#graphics’).find(‘#XYZ’); cls1 = sel.val(); sel2 = jQuery(‘#editfont_button’).find(‘#mn_fpl_colorbackconf’); cls2 = sel2.val(); }); […]

How to clear wpColorPicker (Iris.js)?

I’m trying to clear the WordPress colorpicker but seems it doesn’t work. This is what I’Ve tried: $(‘#element’).wpColorPicker(‘clear’); //error: Uncaught Error: no such method ‘clear’ for wpColorPicker widget instance $(‘#element’).wpColorPicker(‘color’, ‘#’); //no output/change $(‘#element’).wpColorPicker(‘color’, ”); //no output/change Of course there’s no method mentioned in the documentation but there’s a options for a callback method so […]

Adding a colorbutton in tinymce dialog with current api

I’m trying to add a colorbutton in a tinymce dialog box, which i was able to do with the help of using this stackoverflow question here: The problem is I need it to take the hex value thats selected and inject it into the shortcode. Here is a fiddle i made it will […]

Using in-build Visual Composer param types in custom param types

I’m developing a new param type by following this guide. This new param type will contain a color picker and 3 text fields.To use VC’s in-built colorpicker, made a littre research and found these codes from js_composer/include/params//colorpicker/colorpicker.php function vc_colorpicker_form_field( $settings, $value ) { return ‘<div class=”color-group”>’ . ‘<input name=”‘ . $settings[‘param_name’] . ‘” class=”wpb_vc_param_value wpb-textinput […]

Remove margin from CSS gradient color code

I’m trying to use a CSS gradient code within a container that has a border and 30px margin, but this code is filling the margin space too. I want the margin to be left out of the gradient. I tried adding ‘margin: 0;’ and ‘margin: 0!important’, but it’s not working. Any ideas? Thanks. .bg-gradient-row { […]