How to change ANY instances of x color to y color instead with css or other method?

Hey folks,

How can one change ANY instances of x color to y color instead with css or other method?

  • Adam Czajczyk

    Hey Greg,

    I hope you're well today and thank you for your question!

    In order to change any instance of a color - no matter what element it's assigned to - you'll most likely want to edit your theme's stylesheet file which is usually a style.css file but in case of some themes there might be multiple files with .css extension. If so, you'd probably need to edit them all.

    The simplest way would be to run "search and replace" function of a text editor on those files. If your editor (a clean-text editor such as Notepad++, Sublime or any built-in editor of a CSS/php/development IDE) allows you to run a bulk query on files, that would make things way easier.

    So, in order to change #FF0000 (red) color to #0000FF (blue) color you'd need to run editor's query (usually there's a tool for this) that would search for #FF0000 string in all the files and then replace them with #0000FF string.

    That's of course assuming that you wish to replace all instances of the color. Otherwise, you'll want to simply find an element's class name or id name (with Chrome's or Firefox'es built-in "Element Inspector") and then give it a new color manually, unless the theme you're using lets you edit site's layout with some kind of a "point and click" editor.

    If you have any further questions on this, please ask. I'll be glad to assist!

    Regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.