kallookoo / wp-color-picker-alpha

Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
GNU General Public License v2.0
131 stars 88 forks source link
mode-rgba wordpress wp-color-picker

wp-color-picker-alpha

Only run in input and is defined data alpha in true

Screenshots

wpColorPicker

wpcolorpicker-01

wpColorPicker in mode Alpha Channel

wpcolorpicker-02 wpcolorpicker-03

Usage

Download and copy script inside folder dist in you theme options or plugin. This would be an example to use it:

wp_enqueue_style( 'wp-color-picker' );
wp_register_script( 'wp-color-picker-alpha', $url_to_script, array( 'wp-color-picker' ), $current_version, $in_footer );
wp_add_inline_script(
    'wp-color-picker-alpha',
    'jQuery( function() { jQuery( ".color-picker" ).wpColorPicker(); } );'
);
wp_enqueue_script( 'wp-color-picker-alpha' );

Add class .color-picker and data-alpha-enabled="true" in input.

On previous versions of the 3.0.0 this script it starts automatically, but I have decided not to do it anymore.

Optional

License

Licensed under the GPLv2 license or later.

Support

If you would like to contribute please fork the project and report bugs or submit pull requests.

Tested

It was tested with Firefox and the WordPress 6.5.3 version.

Testing

For testing download or clone wp-color-picker-alpha-plugin inside WordPress plugins folder and activate.

Changelog

v3.0.3
v3.0.2
v3.0.1
v3.0.0
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1
v2.0
v1.2.2
v1.2.1
v1.2
v1.1
v1.0.0

Initial Release