3 \@sXddddddgZdZdZdZd dZd dZd dZd dZddZddZ ddZ dS) rgb_to_yiq yiq_to_rgb rgb_to_hls hls_to_rgb rgb_to_hsv hsv_to_rgbg?g@g@g@cCsRd|d|d|}d||d||}d||d||}|||fS)Ng333333?gzG?g)\(?gGz?gHzG?gQ?g= ףp=?)rgbyiqrr /usr/lib64/python3.6/colorsys.pyr(scCs|d|d|}|d|d|}|d|d|}|dkrHd}|dkrTd}|dkr`d}|dkrld}|dkrxd}|dkrd}|||fS) Ng2rL?g,?g:?gnєW?g6޷?gJ"X?gg?r)r r r rr r rrrr.s c Cst|||}t|||}||d}||kr6d|dfS|dkrP||||}n||d||}||||}||||}||||} ||kr| |} n"||krd|| } n d||} | dd} | ||fS)Ng@gg?g@g@g?)maxmin) rr r maxcminclsrcgcbchrrrrKs$       cCsn|dkr|||fS|dkr(|d|}n||||}d||}t|||tt|||t|||tfS)Ngg?g?g@)_v ONE_THIRD)rrrm2m1rrrrbs  cCsT|d}|tkr$||||dS|dkr0|S|tkrP|||t|dS|S)Ng?g@g?) ONE_SIXTH TWO_THIRD)rrZhuerrrrlsrc Cst|||}t|||}|}||kr.dd|fS|||}||||}||||}||||} ||kr|| |} n"||krd|| } n d||} | dd} | ||fS)Ngg@g@g@g?)rr) rr r rrvrrrrrrrrr|s        cCs|dkr|||fSt|d}|d|}|d|}|d||}|d|d|}|d}|dkrt|||fS|dkr|||fS|dkr|||fS|dkr|||fS|d kr|||fS|d kr|||fSdS) Ngg@g?)int)rrrr fpr trrrrs(         NgUUUUUU?gUUUUUU?gUUUUUU?) __all__rrrrrrrrrrrrrrs