Sindbad~EG File Manager

Current Path : /lib64/python3.11/tkinter/__pycache__/
Upload File :
Current File : //lib64/python3.11/tkinter/__pycache__/colorchooser.cpython-311.pyc

�

�=Ogd
��v�ddlmZddgZGd�de��Zd	d�Zedkrede����dSdS)
�)�Dialog�Chooser�askcolorc�"�eZdZdZdZd�Zd�ZdS)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<dSdS#t$rYdSwxYw)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  �-/usr/lib64/python3.11/tkinter/colorchooser.py�_fixoptionszChooser._fixoptions#sm��
	��L��0�E��%��'�'�
G�/>��/F���^�,�,�,�
G�
G���	�	�	��D�D�	���s�/5�
A�Ac��|rt|��sdS|�|��\}}}|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._fixresult0s]���	�S��[�[�	��:��"�"�6�*�*���1�a��3���3���3��'��V���4�4�N)�__name__�
__module__�__qualname__�__doc__�commandrr�rrrrsC������
�
��G����5�5�5�5�5rNc�t�|r|���}||d<tdi|�����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  rrrDsC��
�(��,�,�.�.��"'�������W���"�"�$�$�$r�__main__r)N)�tkinter.commondialogr�__all__rrr�printr"rr�<module>r*s���(�'�'�'�'�'��j�
!��-5�-5�-5�-5�-5�f�-5�-5�-5�f%�%�%�%�"�z���	�E�'�8�8�:�:�������r

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