Python: RGB Color Gradation Function