I am a web designer.
When I browse web sites I like to change some colors and look at how site will appear when I change the primary color.
I do this using "inspect elements". But it is very time consuming work since I need to add lot of codes to change everywhere.
Is there any JavaScript code which I can use to change one color code to another color code using browser console.
Basically what I want to is something like below...
Change #FFF8DC color to #e6dfc6 color everywhere in this site using browser console.
This is very easy! On this site we have
#FFF8DC
asbackgroundColor
by"Featured on Meta"
div
block on the right. You have to put in the browser console:Or you could choose some element using "inspect elements" like on this screenshot:
and then for changing of this foreground and background colors you have to put in the browser console:
press the
enter key
and colors will be changed.If you want to use some code for the console all the time then you have to use snippets. Go to the developer tools and click there on the tab
"Sources"
like on this screenshot:then put your code to a new snippet and then click with right mouse button the name from this snippet and in context menu click on
"Run"
. This snippet will be executed. Do not forget to save this snippet: click with right mouse button the name from this snippet and in context menu click on"Save..."
, but on displayed"Save dialog box"
click on"Cancel"
(this is weird) and your snippet will be saved.