???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................U
    e5dA
  ã                   @   s>   d dl mZ G dd„ deƒZd	dd„Zedkr:edeƒ ƒ dS )
é    )ÚDialogc                   @   s$   e Zd ZdZdZdd„ Zdd„ ZdS )ÚChoosera   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.
    Ztk_chooseColorc                 C   s@   z&| j d }t|tƒr$d| | j d< W n tk
r:   Y nX dS )zvEnsure 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Úcolor© r   ú,/usr/lib64/python3.8/tkinter/colorchooser.pyÚ_fixoptions!   s    

zChooser._fixoptionsc                 C   s>   |rt |ƒsdS | |¡\}}}|d |d |d ft |ƒfS )z±Adjust 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é   )ÚstrZ	winfo_rgb)r	   ZwidgetÚresultÚrÚgÚbr   r   r   Ú
_fixresult.   s    zChooser._fixresultN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Zcommandr   r   r   r   r   r   r      s   r   Nc                 K   s"   | r|  ¡ }| |d< tf |Ž ¡ S )z¬Display 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   )Úcopyr   Zshow)r
   r   r   r   r   ÚaskcolorB   s    r   Ú__main__r
   )N)Ztkinter.commondialogr   r   r   r   Úprintr   r   r   r   Ú<module>   s   3
