python codes to do some color processing