I was browsing over Google to find a way to change the colors of notify-osd and found johnl's topic. Since it's a little bit outdated, i myself ported and improved his path to work flawlessly on Karmic's version.
The patch was made to work with version 0.9.24
1. download & install dependencies
install basic development tools:
get the required libraries to build notify-osd:
sudo apt-get install build-essential libnotify-bin
Download the source from notify-osd
sudo apt-get build-dep notify-osd
apt-get source notify-osd
3. download and apply the attached patch file
right click on the attached .patch files. choose to save it in the same directory you fetched the source (in my case, ~/notify-osd-0.9.24). There are two patches attached. One purely adds the feature to change the colors. The other one changes it and also puts the notify on the very top right, just like older jaunty version (thanks Julien Lavergne).
Choose one of these patches and apply it.
patch -p1 -i notify-color-hack-karmic.patch.txt
patch -p1 -i notify-color-position-hack-karmic.patch.txt
There should not be any errors.
4. build a new notify-osd
This will create a deb package of your hacked notify-osd in your home folder. Install it with gdebi or dpkg.
dpkg-buildpackage -rfakeroot -uc -b
Now you have to create the config file that will determine the colors of the notification bubble.
sudo dpkg -i notify-osd-0.9.24*.deb
5. customizing the colors
save the following file as ".notify-osd" in your home directory:
edit the file ~/.notify-osd to edit the colors. Because this is a quick hack, make sure that each line follows the format "key = value" including the spaces around the equals sign. It's lame, I know.
bubble-background-color = DBDBDB
bubble-background-opacity = .65
text-title-color = 000000
text-title-opacity = 1.0
text-body-color = 527499
text-body-opacity = 1.0
text-shadow-opacity = .1
text-shadow-color = 000000
*-color entries change the color of that item. For example, bubble-background-color changes the notification window color. The value for these entries is a html-style color without the leading "#". E.g,
will give you a light gray window.
bubble-background-color = c0c0c0
*-opacity entries change the opacity (transparency) of that item when compiz is enabled. "1.0" means entirely opaque. "0.0" means entirely transparent (invisible). E.g,
Will give you a window that is 75% opaque.
bubble-background-opacity = 0.75
If you make changes to the configuration file you must kill the current running notify-osd process ('killall notify-osd') before you will see the changes. You don't need to restart it as it will restart automatically next time it is needed.
Thanks to johnl for the original Howto