calculate a colour gradient

Mark Light light at
Thu Jun 17 17:07:41 CEST 2004

   I have a tk.scale bar for which I want the background to change from
blue to red as I slide along it. The mechanics of this I can do, but
the colour gradient I have is very crude - basically the amount of R in
RGB just increases whilst the G and B are fixed values. Whilst this is
not really a python question does anybody have any suggestions about
calculating the RGB values for a smooth colour gradient?



More information about the Python-list mailing list