Anonymous User 14254218
(@anonymized-14254218)
See the discussion here:
https://wordpress.org/support/topic/accent-color-hue-picker-as-regular-picker/
I asked for the same thing but this will not happen.
If you know what you are doing, you can use theme mod properties to set all colors individually within the functions.php (ideally within a child theme):
/* set default theme colors */
$background_color = '0f0f0f';
$text = '#f9f9f9';
$accent = '#ff0000';
$secondary = '#2a2a2a';
$borders = '#1a1a1a';
set_theme_mod('background_color', $background_color);
set_theme_mod('cover_template_overlay_background_color', '#' . $background_color);
set_theme_mod(
'accent_accessible_colors',
array(
'content' => array(
'text' => $text,
'accent' => $accent,
'secondary' => $secondary,
'borders' => $borders,
'background' => '#' . $background_color,
),
'header-footer' => array(
'text' => $text,
'accent' => $accent,
'secondary' => $secondary,
'borders' => $borders,
'background' => '#' . $background_color,
),
)
);
-
This reply was modified 6 years, 3 months ago by
Anonymous User 14254218.
Thank you, Raqai!
To the devs/designers:
Accessibility is a fair argument. And I fully support increased awareness and consideration. But to force it by design and to refuse offering an config-friendly alternative, goes a bit too far, in my opinion.
Besides, there seems to be a two-way approach in the theme’s Customize panel. If you go to the settings for the Cover Template, there is a slider to set opacity. Instead of, again, forcing a contrast ratio threshold by design, users are free to adjust the opacity to their liking, with the friendly and just reminder: “Make sure that the contrast is high enough so that the text is readable.” Fair enough. Same should apply to the Primary Color setting.
Accessibility should not come at the cost of the ease-of-use of fundamental customization features. They should co-exist. Trust publishers to do the right thing.
Anonymous User 14254218
(@anonymized-14254218)
@rogierpmd totally agree with you.
But since the theme provides mod properties and as a developer you should use child themes anyways, I think the devs are doing their job.
Providing easy to use customization options for those who do not exactly know what they might be doing when using cancerous colors while giving devs the flexibility which is needed.
Let’s say I agree to disagree with the devs regarding this topic.
Especially since I only found those properties after working through the full code of the theme because there was no useful documentation for this.
Thanks for the code, we can also use a plugin instead of editing functions.php
I used this one:
https://wordpress.org/plugins/code-snippets/
And it works great.
But the $background_color takes all the page and not half the page as the customizer does…
There should be 2 backgrounds…
Anonymous User 14254218
(@anonymized-14254218)
the theme mods for background_color and accent_accessible_colors are used to set the different backgrounds. I did only provide an example, not a general solution 🙂
@raqai I was searching for exactly your code. Thankyou for sharing. Now I can adjust the colors in my child theme. Such a pain to understand it, how to customize them.