changed function to check if a surface has a color key