Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/tkinter/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/tkinter/__pycache__/colorchooser.cpython-312.pyc

�

&Μgd
��^�ddlmZddgZGd�de�Zd	d�Zedk(rede��yy)
�)�Dialog�Chooser�askcolorc� �eZdZdZdZd�Zd�Zy)ra�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��	|jd}t|t�rd|z|jd<yy#t$rYywxYw)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�colors  �1/usr/local/lib/python3.12/tkinter/colorchooser.py�_fixoptionszChooser._fixoptions#sK��
	��L�L��0�E��%��'�/>��/F����^�,�(���	��	�s�15�	A�Ac�z�|rt|�sy|j|�\}}}|dz|dz|dzft|�fS)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�)�str�	winfo_rgb)r�widget�result�r�g�bs      r�
_fixresultzChooser._fixresult0sJ���S��[���"�"�6�*���1�a��3���3���3��'��V��4�4�N)�__name__�
__module__�__qualname__�__doc__�commandrr�rrrrs��
��G��5rNc�b�|r|j�}||d<tdi|��j�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	r")�copyr�show)rr
s  rrrDs3��
��,�,�.��"'������W��"�"�$�$r�__main__r)N)�tkinter.commondialogr�__all__rrr�printr"rr�<module>r*sA��(��j�
!��-5�f�-5�f%�"�z��	�'�8�:��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists