%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/__pycache__/colorsys.cpython-312.pyc

�

���f���F�dZgd�ZdZdZdZd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zy)
aJConversion functions between RGB and other color systems.

This modules provides two functions for each color system ABC:

  rgb_to_abc(r, g, b) --> a, b, c
  abc_to_rgb(a, b, c) --> r, g, b

All inputs and outputs are triples of floats in the range [0.0...1.0]
(with the exception of I and Q, which covers a slightly larger range).
Inputs outside the valid range may cause exceptions or invalid outputs.

Supported color systems:
RGB: Red, Green, Blue components
YIQ: Luminance, Chrominance (used by composite video signals)
HLS: Hue, Luminance, Saturation
HSV: Hue, Saturation, Value
)�
rgb_to_yiq�
yiq_to_rgb�
rgb_to_hls�
hls_to_rgb�
rgb_to_hsv�
hsv_to_rgbgUUUUUU�?gUUUUUU�?gUUUUUU�?c�r�d|zd|zzd|zz}d||z
zd||z
zz
}d||z
zd||z
zz}|||fS)Ng333333�?g�z�G��?g)\��(�?g�G�z��?gH�z�G�?g���Q��?g=
ףp=�?�)�r�g�b�y�i�qs      �/usr/lib/python3.12/colorsys.pyrr(s\���Q���a���$�q�&� �A��a��c�
�T�1�Q�3�Z��A��a��c�
�T�1�Q�3�Z��A�
�q�!�9��c��|d|zzd|zz}|d|zz
d|zz
}|d|zz
d|zz}|dkrd}|dkrd}|dkrd}|dkDrd}|dkDrd}|dkDrd}|||fS)	Ng2r��L�?g����,��?g:�����?g�nєW�?g6�޷���?gJ"�X�?���?r	)r
rrr
rrs      rrr.s���
	
��q� � �#5�a�#7�7�A�	���!�!�$6�q�$8�8�A�	��q� � �#5�a�#7�7�A��3�w����3�w����3�w����3�w����3�w����3�w���
�q�!�9�rc� �t|||�}t|||�}||z}||z
}|dz}||k(rd|dfS|dkr||z}n|d|z
|z
z}||z
|z}	||z
|z}
||z
|z}||k(r||
z
}n||k(r	d|	z|z
}nd|
z|	z
}|dzdz}|||fS)N�@r��?�@�@r��max�min)
r
rr�maxc�minc�sumc�rangec�l�s�rc�gc�bc�hs
             rrrKs����q�!�Q�<�D��q�!�Q�<�D���I�D��4�i�F��S��A��t�|��A�s�{���C�x��T�M���c�$�h�t�m�$��
�q�&�F�	�B�
�q�&�F�	�B�
�q�&�F�	�B��D�y��r�E��	
�d����F�2�I����F�2�I��	
�3��#�
�A��a��7�Nrc��|dk(r|||fS|dkr	|d|zz}n||z||zz
}d|z|z
}t|||tz�t|||�t|||tz
�fS)Nrrrr)�_v�	ONE_THIRD)r&r!r"�m2�m1s     rrrcsu���C�x��!�Q�w���C�x�
�#�a�%�[��
�q�S�!�A�#�Y��	�Q����B��r�2�q��{�#�R��B��]�B�r�2�q��{�4K�L�Lrc��|dz}|tkr|||z
|zdzzS|dkr|S|tkr|||z
t|z
zdzzS|S)Nrrr)�	ONE_SIXTH�	TWO_THIRD)r+r*�hues   rr(r(ms^��

��)�C�
�Y���R��U�C�K��O�#�#�
�S�y��	�
�Y���R��U�Y�s�]�+�C�/�/�/�
�Irc���t|||�}t|||�}||z
}|}||k(rdd|fS||z}||z
|z}||z
|z}	||z
|z}
||k(r|
|	z
}n||k(r	d|z|
z
}nd|	z|z
}|dzdz}|||fS)Nrrrrrr)r
rrrrr �vr"r#r$r%r&s            rrr}s����q�!�Q�<�D��q�!�Q�<�D��4�i�F��A��t�|��C��{����
�A�
�q�&�F�	�B�
�q�&�F�	�B�
�q�&�F�	�B��D�y��r�E��	
�d����F�2�I����F�2�I��	
�3��#�
�A��a��7�Nrc��|dk(r|||fSt|dz�}|dz|z
}|d|z
z}|d||zz
z}|d|d|z
zz
z}|dz}|dk(r|||fS|dk(r|||fS|dk(r|||fS|dk(r|||fS|d	k(r|||fS|d
k(r|||fSy)Nrrr�������)�int)r&r"r1r�f�pr�ts        rrr�s����C�x��!�Q�w���A�c�E�
�A�	
�3��!��A�	�3��7��A�	�3��1��9�
�A�	�3��C��E��?��A�	�!��A��A�v��!�Q�w���A�v��!�Q�w���A�v��!�Q�w���A�v��!�Q�w���A�v��!�Q�w���A�v��!�Q�w��rN)�__doc__�__all__r)r-r.rrrrr(rrr	rr�<module>r@sF���.&��

�	��	��	���:�0M�� �(r

Zerion Mini Shell 1.0