| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Python315/Lib/__pycache__/ |
Upload File : |
R
>lqj� c �J � Q s , QNsQ sQ
sQsQ sQ sQ sQ sQ s Q s
Q sP! )aJ Conversion 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
c �� � Q U * QU* * QU* * oQV*
* QV#*
* *
oQV*
* QV#*
* * oV4U1! )g333333�?g�z�G��?g)\��(�?g�G�z��?gH�z�G�?g���Q��?g=
ףp=�?� )�r�g�b�y�i�qs &&& �C:\Python315\\Lib\colorsys.py�
rgb_to_yiqr
( sR � ��Q���a���$�q�&� �A��a�c�
�T�1�3�Z��A��a�c�
�T�1�3�Z��A�
�!�9�� c �, � U Q U* * QU* * oU QU* *
QU* *
oU QU* *
QU* * oUQ6 c QoUQ6 c QoUQ6 c QoUQ6� c QoUQ6� c QoUQ6� c QoV4U1! )g2r��L�?g����,��?g:�����?g�nєW�?g6����?gJ"�X�?� � �?r )r r r r r r s &&& r �
yiq_to_rgbr . 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���
�!�9�r c � � [ VU2 o[ VU2 oV4* oV4*
oUQ * oVC6X c QUQ1! UQ6: c
Ve* oLUQ U*
U*
* oV0*
U* o V1*
U* o
V2*
U* oV6X c
V�*
oL'V6X c Q U * U*
oLQU
* U *
oUQ* Q* oV�U1! )� @r
� �?� @� @r ��max�min)
r r r �maxc�minc�sumc�rangec�l�s�rc�gc�bc�hs
&&& r �
rgb_to_hlsr"