ACC SHELL
Path : /usr/lib/python/ |
|
Current File : //usr/lib/python/colorsys.pyo |
nMc @ s d Z d d d d d d g Z d d Z d d Z d
d Z d Z d Z d
Z d Z d Z d Z
d Z d S( sJ 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
t
rgb_to_yiqt
yiq_to_rgbt
rgb_to_hlst
hls_to_rgbt
rgb_to_hsvt
hsv_to_rgbg ?g @g @g @c C s[ d | d | d | } d | d | d | } d | d | d | } | | | f S(
Ng333333?gzG?g)\(?g333333?gQ?g{Gz?gzG?gp=
ף?gףp=
?( ( t rt gt bt yt it q( ( s /usr/lib/python2.6/colorsys.pyR % s c C s | d | d | } | d | d | } | d | d | } | d j o
d } n | d j o
d } n | d j o
d } n | d j o
d } n | d j o
d } n | d j o
d } n | | | f S( NgD)X?gSh?gfb?g4Ry?gV?gvꭁ?g g ?( ( R R
R R R R ( ( s /usr/lib/python2.6/colorsys.pyR + s
c C s t | | | } t | | | } | | d } | | j o d | d f S| d j o | | | | } n | | d | | } | | | | } | | | | } | | | | } | | j o | | }
n. | | j o d | | }
n d | | }
|
d d }
|
| | f S( Ng @g g ?g @g @g ?( t maxt min( R R R t maxct minct lt st rct gct bct h( ( s /usr/lib/python2.6/colorsys.pyR = s$
c C s | d j o | | | f S| d j o | d | } n | | | | } d | | } t | | | t t | | | t | | | t f S( Ng g ?g ?g @( t _vt ONE_THIRD( R R R t m2t m1( ( s /usr/lib/python2.6/colorsys.pyR N s
c C sh | d } | t j o | | | | d S| d j o | S| t j o | | | t | d S| S( Ng ?g @g ?( t ONE_SIXTHt TWO_THIRD( R R t hue( ( s /usr/lib/python2.6/colorsys.pyR U s
c C s t | | | } t | | | } | } | | j o d d | f S| | | } | | | | } | | | | } | | | | } | | j o | | }
n. | | j o d | | }
n d | | }
|
d d }
|
| | f S( Ng g @g @g @g ?( R R
( R R R R R t vR R R R R ( ( s /usr/lib/python2.6/colorsys.pyR b s
c C s | d j o | | | f St | d } | d | } | d | } | d | | } | d | d | } | d } | d j o | | | f S| d j o | | | f S| d j o | | | f S| d j o | | | f S| d j o | | | f S| d
j o | | | f Sd S( Ng g @g ?i i i i i i i ( t int( R R R R
t ft pR t t( ( s /usr/lib/python2.6/colorsys.pyR q s(
N( t __doc__t __all__R R R R R R R R R R ( ( ( s /usr/lib/python2.6/colorsys.pyt <module> s
ACC SHELL 2018