Wednesday, February 20, 2008

Customizing AdSense Ad Units


This is a simple tutorial on how you can customize the AdSense Ad Units to match your blog's template colors. The good news is that you don't need any advance image processing software or you don't need to be an image processing expert to do it. I will tell you how you can do it using very simple tools such as Microsoft Paint and the Calculator!

The Task
First let's take a look at the Before and After views of the Ad Unit that we are going to customize. (For this example, I have used a Link Unit but it doesn't matter)

The figure below shows a basic 180 x 90 Five Link Unit button, which you can easily add using the Add Page Element wizard in Blogger.

The Before view has a white background which does not match with the column's background color. It is also nice if you can match the text color to the color of the rest of the text in the column. The After view shows the customized unit.

The difficult part is to get the exact color match to those in the background and the text. Let's see how we can easily do this with the simple tools mentioned above.

Initial Work

Before we proceed, we need to decide which of the ad unit's color elements should be customized (Read this article to understand the 5 basic color elements available for customization). Since we are using a Link Unit, the Text and Url color elements are not relevant. We only have to match the Border, Background and the Title elements.

Next we need the exact match for the RGB color values. Each RGB color is represented using a number such as #6699cc and we can use the simple technique described here to find out those values of the colors that we need to match.

Using that technique we can find out the color values we need for the Background, Title and Border elements (If you customize an Ad Unit, you have to match the RGB values of Text and Url elements as well).

Now we can proceed and customize the ad unit.

Customize the Ad Unit

Armed with the RGB values for all the color elements, open the ad unit in edit mode and simply type the relevant RGB value for each color element. Click SAVE CHANGES and you are done. You will have an ad unit that blends in perfectly with the colors in your blog/site!

That's it. Hope you found this tutorial useful. Let me know what you think about it.