Questions tagged [color-picker]
The color-picker tag has no usage guidance.
70
questions
1
vote
1answer
28 views
+50
Is there a way to set the gutenberg color palette outside the theme?
Is there a away to set the gutenberg block-editor color palette other than in the theme?
0
votes
0answers
28 views
WP Gutenberg custom block - generate theme colors from SASS and use them in the inspector and php callback
I would like to accomplice the following:
Define theme colors in a SASS (.scss) file using nested variables.
Add these colors to gutenberg using add_theme_support( 'editor-color-palette', array())
...
1
vote
0answers
47 views
Can the wordpress color palettes by changed through Javascript?
I'm building a setup for a client that allows them to use a number of colour swatches throughout their gutenberg blocks in a post. They define the colour swatches in the document inspector panel (post-...
0
votes
0answers
6 views
retrieve “Link Color” value
I've set the Link color using the color picker in the front end. I want to use this color for buttons on the site so I used the following code in header.php
<style>
.btn{
background-color: &...
0
votes
1answer
93 views
Iris color picker in custom theme option page not saving value
I have implimented the Iris color picker on my theme options page, but clicking 'Save' does not save the selected value, it just resets to blank (or the pre-set value). What am I missing here?
...
0
votes
3answers
230 views
How to give each category name its own ACF background color?
I'm building a webshop, and started to configure the product loop on the shop archive page.
I display the product category related to every product, and I would like to set to the categories to have a ...
0
votes
1answer
217 views
How to add custom color fields to the category edit page?
I'm building a Wordpress theme and I am currently finishing the category.php page. For this page, I would like the user to select two colors (background color and title/text color) and use them in the ...
0
votes
1answer
26 views
Trying to customise 2011 Child Theme Background Colour
I am trying to customise the background colour of my site. It's a 2011 Child Theme. When I go to Appearance -> Customize -> Colors, I get the Light and Dark option under Color Scheme, but can't ...
0
votes
1answer
18 views
How to add more default colors?
I just reinstalled my website with the same theme and now the other default colors are gone. Only black is left.
Is there a way to add more default colors?
0
votes
0answers
10 views
Alpha Color Picker, moving title at beginning of picker
I am using alpha color picker (with transaprency) by Braad Martin's. See Source Here
Initially, it doesn't show the title and description. Its shown as below
When I click the button it shows the ...
2
votes
0answers
115 views
How to store Gutenberg ColourPicker RGBA as metadata
I'm trying to build a sidebar plugin for Gutenberg which uses the ColorPicker component to store a chosen rgba value in metadata using withSelect and withDispatch (I'm testing below with the hex value)...
1
vote
0answers
37 views
How do I update the wpColorPicker palette after initialization?
Once the customizer color picker is initialized, how can the color palette be updated? The palette can be set through the js options before it's initialized using something like:
jQuery.wp....
0
votes
1answer
25 views
Looping inside block return
I have a custom block that allows me to choose a color. This is how the block's return function looks:
return (
el( 'div', { },
...
2
votes
2answers
55 views
Change default colors in paragraph block settings
I need to have the client's theme colors here so he doesn't have to remember the color codes each time he's using them.
Is
is there any way to Add/Remove/Change some colors from the default "...
0
votes
1answer
132 views
Wordpress colorpicker save both hex and RGB
Trying to get both the hex and RGB value of a color from the native color picker in Wordpress, user chooses the color via a custom metabox in the admin. Just need to save both values as meta for re-...
0
votes
1answer
143 views
Are there any CSS classes for the wordpress colours?
Are there any CSS classes for the wordpress colours: https://make.wordpress.org/design/handbook/design-guide/foundations/colors/
For instance, classes like these from the Twenty Seventeen Theme:
....
0
votes
1answer
124 views
Can't get wpColorPicker to work in a widget
I can show the color picker, I can change the color and see the save button watching that, however nothing is saved to DB and I'm getting
Undefined index: my_color", file:
"wp-content/plugins/...
3
votes
2answers
2k views
How do I change Twenty Nineteen's primary color without using the color slider in the theme customizer?
Just installed the new 2019 theme. The customizer offers "default" and "custom" color options. When you select "custom", it shows a slider to pick the color, not the normal color-picker.
...
-2
votes
2answers
39 views
How to change first letter of active menu item
Hello can anyone please give me the code, and tell me where to put it, for how to the change the first letter or the active menu item to red?
thank you
0
votes
2answers
2k views
Custom color for each category name
I have tested several plugins and none is perfect solution. I would like to have simple solution so user can select the color for the Category name which will be the actual color of the text/link like ...
0
votes
0answers
158 views
How to place a color picker field into my plugin admin tab
I'm creating a plugin that has a few tabs for better organisation. I'm trying to place a color picker on the plugin settings page under a tab I've called checkout. I've tried following the ...
0
votes
1answer
29 views
Integrating colorpicker into array field
I am using this code and i am trying to show a colorpicker onto an array field. Any ideas, how to do it?
<?php
class Smashing_Fields_Plugin {
public function __construct() {
// Hook ...
5
votes
2answers
3k views
How to implement color picker from wordpress in my plugin?
I'm having difficulty implementing the color picker exactly the same as WordPress in my plugin.
Is there any official wordpress documentation on how to use this feature?
0
votes
3answers
2k views
How to add color picker in theme options
I'm new to WordPress I want to add simple color picker in theme options.I tried but not getting can anyone suggest me?
1
vote
0answers
349 views
Dashboard widget, screen options/help doesn't work?
I have managed to break something with my Wordpress Multisite install. I have tried deactivating every plugin and activating again.
Right now I cannot click the Screen Options or Help in the dashboard ...
1
vote
2answers
692 views
Custom color does not stick
I use a custom color for certain words on my web site. Every time want to use that color I need to click the Text Color icon and Customize... I then type in the RGB. Problem: It doesn't save that ...
1
vote
0answers
182 views
Color picker in widget appears twice when added via the Customizer
I've used this https://core.trac.wordpress.org/attachment/ticket/25809/color-picker-widget.php as a reference to add a color picker to custom widget. Everything works great when this widget is added ...
1
vote
2answers
67 views
How I can get custom field's current value?
I have "Color Filters for WooCommerce" plugin and "color" taxonomy.
Each taxonomy have one custom field - color picker.
I want to display on archive page current color picker value of each product's....
0
votes
2answers
858 views
Using WP Color Picker in Repeatable Fields
I wrote a repeater script that clones the last field group before it. My issue is that cloned WP Color Picker fields don't open the new color spectrum when clicked on but instead opens the color ...
0
votes
2answers
40 views
Need to over ride a !important from the index file
Something really weird happened. I want to change the color of this text but the index file has an !important there and when i change the color on my style.css file it doesn't work. What can i do to ...
8
votes
2answers
13k views
How do you add custom color swatches to all WYSIWYG editors?
I would like to be able add the same custom colours to the swatches at bottom of colour picker panels that appear in the WYSIWYG editors across the site, to make it easier for clients to keep ...
1
vote
1answer
4k views
Color picker for posts and pages
I want to add color picker to wordpress posts and pages at admin menu. I have this code for color picker:
add_action( 'admin_enqueue_scripts', 'add_color_picker' );
function add_color_picker( $hook )...
0
votes
1answer
81 views
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 ...
3
votes
0answers
372 views
iris color picker in widget - click event doesn't fire when initially when widget is first created
I added the wordpress(iris) color picker to a widget, and the color picker is not clickable when the widget is first created. My guess is that it's where/how the javascript file is being enqueued, but ...
6
votes
1answer
721 views
Color Picker (iris) in widget - refresh when edited in Customizer
I have added the WordPress Core color picker (iris) to a widget I developed, but when I edit the color, there is no change triggered. As a result, the iframe (live preview) for the Customizer does not ...
1
vote
0answers
167 views
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 ...
2
votes
1answer
274 views
Add colorpicker to featured image
I'm trying to add a colorpicker to the featured image meta-box.
Here is some background:
I use the featured image meta-box to place parallax background images.
Because a user is allowed to place text ...
5
votes
2answers
2k views
How to refresh Theme Customizer after change color inside wpColorPicker?
I develop my custom widget with setting where I can set up custom color for the widget. I use this code to initialize wpColorPicker instead of default text input in form() method of Widget class:
...
3
votes
1answer
447 views
Is it possible to make Wordpress core (iris)colorpicker-wrapper higher instead of making colorboxes scale smaller?
I'm having an issue using wordpress core colorpicker. I'm retrieiving random number of colors from the server (that fetches colors a specific website). These colors I want to use within the color-...
1
vote
0answers
173 views
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: https://stackoverflow.com/questions/23511566/adding-a-...
1
vote
1answer
866 views
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 ...
2
votes
1answer
592 views
Cutomize Colors utility: How to add more configurable colors to a theme
Recent Wordpress install, default theme. There are three colors which can be customized from the admin gui, but there are at least three other colors visible on the website which can't be customized ...
1
vote
0answers
889 views
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 ...
3
votes
1answer
673 views
use add_action('wp_head') in a widget for generating dynamic CSS styles
I have been working on a 'Custom Pop Links' widget for use in a theme which is ready for distribution. User can change the color of a link using a color picker inside widget. Untill now, I used inline ...
1
vote
0answers
544 views
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 ...
0
votes
1answer
57 views
Handle logo text color from admin section
Hi as per my requirement I need to have
Color Picker option for Logo Text
see image
For TEXT2 I need to have color picker option which can be managed from
admin dashboard
I tried searching ...
-1
votes
1answer
1k views
jQuery color picker function on change
So I'm writing a Wordpress plugin that generates a live preview upon changes to a php form using ajax. Everything is working great, but one little issue with jQuery is not quite right.
Normally, when ...
3
votes
2answers
7k views
How to Use WordPress Color Picker API in Custom Post Type Metabox
I have a Custom Post Type called "Banner" which has a custom Meta box with two advanced fields "Title" (text Field) and "Color" (color Picker).
Can you please let me know how to use the WP Color ...
0
votes
1answer
2k views
Color Picker - Theme options
I've been creating a Theme off my own back just teaching myself about the in's and out's of wordpress API.
Firstly this place has been of great use to me! Now for the question, recently just ...
1
vote
0answers
805 views
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: http://make.wordpress.org/core/2012/11/30/new-color-...