Questions tagged [color-picker]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

Custom editor color palette colors are not appearing in the editor

Below is the function to add my custom colors, the 'disable-custom-colors' is working properly, but the custom colors that I'm trying to add are not appearing in the editor. I have also tried clearing ...
user avatar
  • 17
1 vote
0 answers
30 views

How can I add a color picker to a custom Gutenberg block which includes the default system palette from theme.json?

Do I need to use the ColorGradientControl component to add this interface to a custom block, even if gradients are deactivated by theme.json?
user avatar
0 votes
1 answer
6 views

How to change color of a word in text after WP update

Since the latest WP update it changed my setting. Normally I had a ''change text color'' setting in the red area (see screenshot). Anyone can guide me how to add the option in this field?
user avatar
0 votes
1 answer
80 views

Gutenberg: always show text color selector in editing bar

For the Gutenberg editor, is there a setting, a code-behind change or any other way (if necessary, a plugin, but I'd rather avoid that) to always show the "text color" menu item when editing ...
user avatar
  • 115
0 votes
0 answers
59 views

How to override a function in the wp_includes folder(block supports/colors.php)

I customized my Gutenberg block color pallete and the WordPress default is that the CSS classes generated has the form has-(slug)-color. For example say I added a color called red. The resulting CSS ...
user avatar
0 votes
0 answers
17 views

How To Add color-picker in theme options

I'm trying to add color picker for header/title under Appearance > Customize > Color. As of now, the only option there is background color... For reference, I'm using a Genesis child theme. I'd ...
user avatar
1 vote
0 answers
8 views

Add fields in customization tab to change background colours of certain classes

I'm maintaining a Wordpress theme for a website that has an annual style change. Nothing fundamental, a few images get switched out and the colour scheme changes as well. The theme uses a pallette of ...
user avatar
0 votes
0 answers
61 views

Custom Gutenberg color classes naming convention

The default behavior for the gutenberg blocks with color pallet is: The class name is built appending ‘has-‘, followed by the class name using kebab case and ending with the context name. https://...
user avatar
1 vote
1 answer
210 views

How to set a default color for the WordPress Customizer’s color picker?

I'm developing a WordPress theme in which I'm adding a color control to the Customizer’s “Colors” section, so that the user can customize the footer’s background color. I added a functioning color ...
user avatar
  • 21
0 votes
0 answers
29 views

How to implement color picker from WordPress in my boilerplate plugin?

I have seen this reply before: How to implement color picker from wordpress in my plugin? But I personally still don't quite understand how I can add it in my plugin that follows the boilerplate ...
user avatar
0 votes
0 answers
45 views

Adding a new block editor color option to a theme

I am trying to add new colors to my gutenberg color palette, I would like to add a red color, but when I add the following lines: array( 'name' => _x( 'Red', 'Name of the red color in the ...
user avatar
1 vote
1 answer
182 views

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?
user avatar
0 votes
0 answers
232 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()) ...
user avatar
  • 147
1 vote
0 answers
152 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-...
user avatar
0 votes
0 answers
18 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: &...
user avatar
  • 101
0 votes
1 answer
291 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? ...
user avatar
  • 23
0 votes
3 answers
803 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 ...
user avatar
  • 3
0 votes
1 answer
808 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 ...
user avatar
0 votes
1 answer
35 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 ...
user avatar
0 votes
1 answer
30 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?
user avatar
  • 308
2 votes
0 answers
269 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)...
user avatar
1 vote
0 answers
80 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....
user avatar
  • 989
0 votes
1 answer
26 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', { }, ...
user avatar
2 votes
2 answers
204 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 "...
user avatar
0 votes
1 answer
322 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-...
user avatar
  • 407
0 votes
1 answer
438 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: ....
user avatar
  • 13
0 votes
1 answer
227 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/...
user avatar
  • 15
3 votes
2 answers
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. ...
user avatar
-2 votes
2 answers
82 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
user avatar
0 votes
2 answers
3k 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 ...
user avatar
0 votes
0 answers
291 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 ...
user avatar
0 votes
1 answer
37 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 ...
user avatar
  • 23
7 votes
2 answers
7k 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?
user avatar
2 votes
3 answers
4k 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?
user avatar
0 votes
0 answers
390 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 ...
user avatar
  • 433
1 vote
2 answers
967 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 ...
user avatar
  • 19
1 vote
0 answers
190 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 ...
user avatar
  • 25
1 vote
2 answers
87 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....
user avatar
  • 131
0 votes
2 answers
1k 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 ...
user avatar
0 votes
2 answers
46 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 ...
user avatar
  • 15
9 votes
2 answers
16k 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 ...
user avatar
1 vote
1 answer
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 )...
user avatar
0 votes
1 answer
85 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 ...
user avatar
3 votes
0 answers
425 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 ...
user avatar
  • 81
5 votes
1 answer
782 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 ...
user avatar
  • 81
1 vote
0 answers
181 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 ...
user avatar
2 votes
1 answer
302 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 ...
user avatar
5 votes
2 answers
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: ...
user avatar
3 votes
1 answer
543 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-...
user avatar
1 vote
0 answers
186 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-...
user avatar