Questions tagged [color-picker]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
97 views

Display taxonomy color in custom post archive

I'm still new to programming and therefore a bit lost... I've created a taxonomy "status" for custom posts. I've added a ACF field named "bpn_statuscolor" which gets its value &...
Marc's user avatar
  • 11
1 vote
1 answer
427 views

Theme.json: creating different sections of the color palette

I've got some colors defined in theme.json- is there a way to define custom sections within the color palette? When I set my own colors, they show up in the section labeled "Theme". The ...
clark's user avatar
  • 571
0 votes
0 answers
208 views

Color Picker UI in admin is not correct

I need to have color picker settings filed in my plugin. I have registered a field and its saving value in the database correctly. But, in the admin area the picker user interface is not correct I ...
Akramul's user avatar
0 votes
1 answer
14 views

Unable to set font colour

I'm unable to set the font colour on hyperlinks in my blog posts. I'm runnung WordPress 6.0 running Twenty Fifteen theme. Can anyone let me know if I have to add code to make the hyperlinks blue, or ...
studyaids's user avatar
0 votes
1 answer
624 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 ...
BeccaN's user avatar
  • 17
1 vote
0 answers
157 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?
Mark Howells-Mead's user avatar
0 votes
1 answer
14 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?
Jim Reuters's user avatar
0 votes
1 answer
330 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 ...
1NN's user avatar
  • 115
0 votes
0 answers
129 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 ...
BlackBeard's 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 ...
IneptusMechanicus's user avatar
1 vote
1 answer
527 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 ...
crispy's user avatar
  • 21
0 votes
0 answers
51 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 ...
Matteo Feduzi's user avatar
0 votes
0 answers
81 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 ...
Nathan GRAVIER's user avatar
1 vote
1 answer
264 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?
Nathan Hinchey's user avatar
0 votes
0 answers
357 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()) ...
Tim's user avatar
  • 157
1 vote
0 answers
270 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-...
Dale de Silva's user avatar
0 votes
0 answers
48 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: &...
AtulBhatS's user avatar
  • 101
0 votes
1 answer
623 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? ...
shacker's user avatar
  • 23
0 votes
3 answers
1k 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 ...
Ben's user avatar
  • 3
0 votes
1 answer
1k 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 ...
ralphjsmit's user avatar
0 votes
1 answer
39 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 ...
Anthony Moore's user avatar
0 votes
1 answer
45 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?
Ooker's user avatar
  • 330
2 votes
0 answers
315 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)...
Sean Varnham's user avatar
1 vote
0 answers
124 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....
EHerman's user avatar
  • 989
0 votes
1 answer
43 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', { }, ...
Leonardo Petrucci's user avatar
2 votes
2 answers
329 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 "...
Razvan Cuceu's user avatar
0 votes
1 answer
484 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-...
Simon's user avatar
  • 417
0 votes
1 answer
731 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: ....
j.doe's user avatar
  • 13
0 votes
1 answer
358 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/...
pickos7's 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. ...
Marjan Venema's user avatar
-2 votes
2 answers
214 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
Sana Ahmed El Qersh's user avatar
0 votes
2 answers
4k 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 ...
Benjamin Franklin's user avatar
0 votes
0 answers
515 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 ...
John Cook's user avatar
0 votes
1 answer
52 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 ...
jeejee's user avatar
  • 23
7 votes
2 answers
10k 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?
Gabriel Soligo's user avatar
2 votes
3 answers
5k 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?
Mehraj Khan's user avatar
0 votes
0 answers
400 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 ...
jockebq's user avatar
  • 463
1 vote
2 answers
1k 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 ...
Louie's user avatar
  • 19
1 vote
0 answers
196 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 ...
Vasili's user avatar
  • 25
1 vote
2 answers
91 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....
Frunky'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 ...
Alex Mangini's 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 ...
meb's user avatar
  • 15
10 votes
2 answers
19k 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 ...
Clayton Jones's user avatar
1 vote
1 answer
5k 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 )...
Narek Zakarian's user avatar
0 votes
1 answer
91 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 ...
deemi-D-nadeem's user avatar
3 votes
0 answers
485 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 ...
scendo's user avatar
  • 81
5 votes
1 answer
841 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 ...
scendo's user avatar
  • 81
1 vote
0 answers
186 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 ...
newbdesigner90's user avatar
2 votes
1 answer
334 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 ...
Interactive's 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: ...
Kolya Korobochkin's user avatar