mς
­fIc           @   sP   d  k  l Z d e f d     YZ d d  Z e d j o d Ge   GHn d S(   (   s   Dialogt   Chooserc           B   s&   t  Z d  Z d Z d   Z d   Z RS(   s   Ask for a colort   tk_chooseColorc         C   sY   y? |  i d } t |  t f   j o d | |  i d <n Wn t j
 o n Xd  S(   Nt   initialcolors   #%02x%02x%02x(   t   selft   optionst   colort   typet   KeyError(   R   R   (    (    t2   /mit/python/lib/python2.4/lib-tk/tkColorChooser.pyt   _fixoptions%   s    c         C   sF   | p d Sn | i |  \ } } } | d | d | d f | f S(   Ni   (   NN(   t   resultt   Nonet   widgett	   winfo_rgbt   rt   gt   b(   R   R   R
   R   R   R   (    (    R   t
   _fixresult/   s    (   t   __name__t
   __module__t   __doc__t   commandR	   R   (    (    (    R   R        s    	
c         K   s1   |  o | i   } |  | d <n t |   i   S(   s   Ask for a colorR   N(   R   R   t   copyR    t   show(   R   R   (    (    R   t   askcolor;   s
     t   __main__R   N(   t   tkCommonDialogt   DialogR    R   R   R   (   R   R    R   (    (    R   t   ?   s   