<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
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
