Tagged: color picker
-
AuthorPosts
-
September 23, 2016 at 8:34 am #690555
HI,
I’m trying to set the color for various elements in the General Styling section. When I enter the value for the color that I want #005eb8, the entry is automatically changed to #005fb8. Why?September 24, 2016 at 9:36 pm #691265Hey AlanGRutter,
Thanks for reaching out to us!
Simply put #005fb8 is the safest web color to #005eb8. http://www.colorhexa.com/98cb03
You can research and read more about web safe colors if you like. http://www.htmlgoodies.com/tutorials/web_graphics/consistent-colors-for-your-site-all-you-need-to-know-about-web-safe-colors.html
Best regards,
JordanSeptember 27, 2016 at 6:25 am #692064Hi Jordan,
Thanks for the information. I checked out your links and both #005eb8 and #005fb8 have a web-safe color of #0066cc (according to your link) so I still don’t understand why when I enter #005eb8 it is being changed to #005fb8 as this is no more web-safe than what I entered.I would expect that if I enter #005eb8 as my chosen color (as every other color-picker I’ve ever used allows), then that is what I get – not #005fb8. This is confusing behavior which I consider to be a fault not a feature.
Regards
AlanSeptember 30, 2016 at 1:13 am #693453Hi Alan,
It’s a little bit complicated to explain but basically, the color picker script fails to calculate the color values to the exact decimal because it automatically rounds the color values (HSBToRGB / HSBToHex) to the nearest integer unlike on advanced editor like photoshop which calculates the values to the last decimal.
Yes, it’s a fault or a bug from the third-party script we use for color picking in the backend, but the difference is hardly noticeable in the actual color, if you really need the #hex code to be exact you can add this to your theme / child theme functions.php:
add_filter('avia_dynamic_css_output', function($output, $color_set) { return str_replace('#005fb8', '#005eb8', $output); });
That will look for all the iterances of
005fb8
and replace them with005eb8
(apply the code then resave theme options to generate a new dynamic file).Best regards,
JosueSeptember 19, 2017 at 8:53 pm #854030Hi Josue,
The code you have above created an error when pasted into my child theme’s functions.php. Can you please correct it?September 21, 2017 at 10:18 am #854696September 21, 2017 at 2:17 pm #854869Missing argument 2 for {closure}(), called in /srv/bindings/da7256b0129e419d8d8847a957370a56/code/wp-includes/class-wp-hook.php on line 300 and defined in /srv/bindings/da7256b0129e419d8d8847a957370a56/code/wp-content/themes/Child Theme/functions.php on line 6
Line 6 is where this code is inserted in functions.php
September 23, 2017 at 10:43 am #855763Hi sarahrose,
Could you please describe the issue that you’re having? Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaOctober 3, 2018 at 7:56 am #1017382Good morning
I would like to add to this thread. I am having this problem and the Josue’s code will crash the page – although it looks syntactically correct.
Can you please recheck and consider if we need to replace more than one color?Thanks,
Kr, JayOctober 4, 2018 at 2:39 pm #1017919Hi brandreach_at,
Which version of php are you running?
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaOctober 10, 2018 at 12:04 pm #1019904Hi Victoria
Thanks. I ve opened another thread https://kriesi.at/support/topic/color-picker-changes-value/
Kr
October 11, 2018 at 10:18 pm #1020500Hi,
Thank you, we will follow up there…
Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.