updated color from image function to work with images not in the app bundle