Change AdSense Colors

If you are still using the “old” code to display Google AdSense ads, there is a little know feature that allows you to change the colors dynamically.

I have no idea what Google’s official stance on using this feature is, as they say that you cannot edit the code that they give you to paste on to your webpages, but whatever.

Details after the jump..

All you need to do is add the correct JavaScript variable to you current code.  The variables that are available are shown below.  Simply replace HEXHEX with the 6-character hex code of the color you want to use.

google_color_border = 'HEXHEX';
google_color_bg = 'HEXHEX';
google_color_link = 'HEXHEX';
google_color_text = 'HEXHEX';
google_color_url = 'HEXHEX';
Be Sociable, Share!
This entry was posted in Code and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


This site uses Akismet to reduce spam. Learn how your comment data is processed.