
    F\hd
                     b    S SK Jr  SS/r " S S\5      rS	S jr\S:X  a  \" S\" 5       5        gg)
    )DialogChooseraskcolorc                   (    \ rS rSrSrSrS rS rSrg)r      ap  Create a dialog for the tk_chooseColor command.

Args:
    master: The master widget for this dialog.  If not provided,
        defaults to options['parent'] (if defined).
    options: Dictionary of options for the tk_chooseColor call.
        initialcolor: Specifies the selected color when the
            dialog is first displayed.  This can be a tk color
            string or a 3-tuple of ints in the range (0, 255)
            for an RGB triplet.
        parent: The parent window of the color dialog.  The
            color dialog is displayed on top of this.
        title: A string for the title of the dialog box.
tk_chooseColorc                      U R                   S   n[        U[        5      (       a  SU-  U R                   S'   gg! [         a     gf = f)zfEnsure initialcolor is a tk color string.

Convert initialcolor from a RGB triplet to a color string.
initialcolorz#%02x%02x%02xN)options
isinstancetupleKeyError)selfcolors     +/usr/lib/python3.13/tkinter/colorchooser.py_fixoptionsChooser._fixoptions#   sN    
	LL0E%''/>/F^, (  		s   6: 
AAc                     U(       a  [        U5      (       d  gUR                  U5      u  p4nUS-  US-  US-  4[        U5      4$ )zAdjust result returned from call to tk_chooseColor.

Return both an RGB tuple of ints in the range (0, 255) and the
tk color string in the form #rrggbb.
)NN   )str	winfo_rgb)r   widgetresultrgbs         r   
_fixresultChooser._fixresult0   sJ     S[[ ""6*a333'V44     N)	__name__
__module____qualname____firstlineno____doc__commandr   r   __static_attributes__r    r   r   r   r      s     G5r   Nc                 j    U (       a  UR                  5       nXS'   [        S0 UD6R                  5       $ )zDisplay dialog window for selection of a color.

Convenience wrapper for the Chooser class.  Displays the color
chooser dialog with color as the initial value.
r
   r    )copyr   show)r   r   s     r   r   r   D   s1     ,,."'W""$$r   __main__r   )N)tkinter.commondialogr   __all__r   r   r!   printr    r   r   <module>r/      sA    (j
!-5f -5f%" z	'8: r   