<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>Hello Terry,</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>> new_hue   # your 'basic color', 
just the hue part<BR>> rgb_base  # color from the basic button 
image<BR>> rgb_new   # the new color you want to replace rgb_base 
with<BR>> <BR>> rgb_new = hsv_to_rgb( (new_hue,) + 
rgb_to_hsv(rgb_base)[1:])<BR></FONT></DIV>
<DIV><FONT face=Verdana size=2>    thanks a lot for your 
suggestion! However, either I did not understand it correctly or I am doing 
something stupid in my code. Here is a small example:</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>from colorsys import *</FONT></DIV>
<DIV><FONT face=Verdana></FONT> </DIV>
<DIV><FONT face=Verdana size=2># that is the old colour --> GREY<BR>rgb_old = 
(0.7, 0.7, 0.7)</FONT></DIV>
<DIV><FONT face=Verdana></FONT> </DIV>
<DIV><FONT face=Verdana size=2># Transform the new colour in HSV<BR>hsv_old = 
rgb_to_hsv(rgb_old[0], rgb_old[1], rgb_old[2])</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2># this is the new colour --> BLUE<BR>rgb_new = 
(0.0, 0.0, 1.0)</FONT></DIV>
<DIV><FONT face=Verdana></FONT> </DIV>
<DIV><FONT face=Verdana size=2># Transform the new colour in HSV<BR>hsv_new = 
rgb_to_hsv(rgb_new[0], rgb_new[1], rgb_new[2])</FONT></DIV>
<DIV><FONT face=Verdana></FONT> </DIV>
<DIV><FONT face=Verdana size=2># I take only the Hue part of the new 
colour<BR>new_hue = hsv_new[0]</FONT></DIV>
<DIV><FONT face=Verdana></FONT> </DIV>
<DIV><FONT face=Verdana size=2># Get the new colour<BR>rgb_new = 
hsv_to_rgb(new_hue, hsv_old[1], hsv_old[2])</FONT></DIV>
<DIV><FONT face=Verdana></FONT> </DIV>
<DIV><FONT face=Verdana size=2>print rgb_old<BR>print rgb_new<BR>print rgb_old 
== rgb_new<BR></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>This prints:</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>(0.69999999999999996, 0.69999999999999996, 
0.69999999999999996)<BR>(0.69999999999999996, 0.69999999999999996, 
0.69999999999999996)<BR>True</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>So, no matter what colour I choose as a "new" 
colour, the Hue part of the new colour doesn't change in RGB. In other words, 
leaving the old value for "Saturation" and "Value" makes the presence of the 
"Hue" part useless. But why in the world does this happen? If a colour is 
defined by 3 values, changes in every single value should change the 
colour too... </FONT></DIV>
<DIV><FONT face=Verdana size=2>Ah, thanks God for the existence of RGB 
;-)</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Thanks a lot for every suggestion.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT size=2><FONT face=Verdana>Andrea.</FONT></DIV></FONT>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT size=2><FONT face=Verdana>"Imagination Is The Only Weapon In The War 
Against Reality."<BR></FONT><A href="http://xoomer.virgilio.it/infinity77"><FONT 
face=Verdana>http://xoomer.virgilio.it/infinity77</FONT></A></FONT></DIV></BODY></HTML>