a �DOg��@sPgd�ZdZdZdZdd�Zdd�Zdd �Zd d �Zd d �Zdd�Z dd�Z dS))� rgb_to_yiq� yiq_to_rgb� rgb_to_hls� hls_to_rgb� rgb_to_hsv� hsv_to_rgbgUUUUUU�?gUUUUUU�?gUUUUUU�?cCsRd|d|d|}d||d||}d||d||}|||fS)Ng333333�?g�z�G��?g)\���(�?g�G�z��?gH�z�G�?g���Q��?g= ףp=�?�)�r�g�b�y�i�qrr� /usr/lib64/python3.9/colorsys.pyr(srcCs�|d|d|}|d|d|}|d|d|}|dkrHd}|dkrTd}|dkr`d}|dkrld}|dkrxd}|dkr�d}|||fS) Ng2r��L�?g����,��?g:�����?g��nєW�?g6�޷���?gJ"�X�?���?r)r r r rr r rrrr.s rc Cs�t|||�}t|||�}||d}||kr6d|dfS|dkrP||||}n||d||}||||}||||}||||} ||kr�| |} n"||kr�d|| } n d||} | dd} | ||fS)N�@r��?�@�@r��max�min) rr r �maxc�minc�l�s�rc�gc�bc�hrrrrKs$       rcCsn|dkr|||fS|dkr(|d|}n||||}d||}t|||t�t|||�t|||t�fS)Nrrrr)�_v� ONE_THIRD)rrr�m2�m1rrrrbs  rcCsT|d}|tkr$||||dS|dkr0|S|tkrP|||t|dS|S)Nrrr)� ONE_SIXTH� TWO_THIRD)r#r"Zhuerrrr lsr c Cs�t|||�}t|||�}|}||kr.dd|fS|||}||||}||||}||||} ||kr|| |} n"||kr�d|| } n d||} | dd} | ||fS)Nrrrrrr) rr r rr�vrrrrrrrrr|s        rcCs�|dkr|||fSt|d�}|d|}|d|}|d||}|d|d|}|d}|dkrt|||fS|dkr�|||fS|dkr�|||fS|dkr�|||fS|d kr�|||fS|d kr�|||fSdS) Nrrr�������)�int)rrr&r �f�pr �trrrr�s(         rN) �__all__r!r$r%rrrrr rrrrrr�s