Try from PIL import ImageColor instead.

Edit: In your example, it would be from PIL.ImageColor import getrgb.