If color is not defined, this code will crash.  Also, I'm not sure you are doing the color conversion here properly.  This is one of the reasons the Placemark is not showing up currently.