Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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?

    #691265

    Hey 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,
    Jordan

    #692064

    Hi 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
    Alan

    #693453

    Hi 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 with 005eb8 (apply the code then resave theme options to generate a new dynamic file).

    Best regards,
    Josue

    #854030

    Hi Josue,
    The code you have above created an error when pasted into my child theme’s functions.php. Can you please correct it?

    #854696

    Hi sarahrose,

    What problem did you get exactly?

    Best regards,
    Rikard

    #854869

    Missing 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

    #855763

    Hi 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,
    Victoria

    #1017382

    Good 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, Jay

    #1017919

    Hi 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,
    Victoria

    #1019904

    Hi Victoria

    Thanks. I ve opened another thread https://kriesi.at/support/topic/color-picker-changes-value/

    Kr

    #1020500

    Hi,

    Thank you, we will follow up there…

    Best regards,
    Basilis

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.