Module Expr Str Assign NameStore ListLoad Str Str Str Str Str Str Assign NameStore BinOpDiv Num Num Assign NameStore BinOpDiv Num Num Assign NameStore BinOpDiv Num Num FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpAdd BinOpAdd BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad Assign NameStore BinOpSub BinOpSub BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad Assign NameStore BinOpAdd BinOpSub BinOpMult Num NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpAdd BinOpAdd NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad Assign NameStore BinOpSub BinOpSub NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad Assign NameStore BinOpAdd BinOpSub NameLoad BinOpMult Num NameLoad BinOpMult Num NameLoad If CompareLt NameLoad Num body Assign NameStore Num If CompareLt NameLoad Num body Assign NameStore Num If CompareLt NameLoad Num body Assign NameStore Num If CompareGt NameLoad Num body Assign NameStore Num If CompareGt NameLoad Num body Assign NameStore Num If CompareGt NameLoad Num body Assign NameStore Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpDiv BinOpAdd NameLoad NameLoad Num If CompareEq NameLoad NameLoad body Return TupleLoad Num NameLoad Num If CompareLtE NameLoad Num body Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpAdd NameLoad NameLoad orelse Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub BinOpSub Num NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad If CompareEq NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore BinOpSub BinOpAdd Num NameLoad NameLoad orelse Assign NameStore BinOpSub BinOpAdd Num NameLoad NameLoad Assign NameStore BinOpMod BinOpDiv NameLoad Num Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad If CompareLtE NameLoad Num body Assign NameStore BinOpMult NameLoad BinOpAdd Num NameLoad orelse Assign NameStore BinOpSub BinOpAdd NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpSub BinOpMult Num NameLoad NameLoad Return TupleLoad Call NameLoad NameLoad NameLoad BinOpAdd NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad BinOpSub NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpMod NameLoad Num If CompareLt NameLoad NameLoad body Return BinOpAdd NameLoad BinOpMult BinOpMult BinOpSub NameLoad NameLoad NameLoad Num If CompareLt NameLoad Num body Return NameLoad If CompareLt NameLoad NameLoad body Return BinOpAdd NameLoad BinOpMult BinOpMult BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore NameLoad If CompareEq NameLoad NameLoad body Return TupleLoad Num Num NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign NameStore BinOpDiv BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad If CompareEq NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore BinOpSub BinOpAdd Num NameLoad NameLoad orelse Assign NameStore BinOpSub BinOpAdd Num NameLoad NameLoad Assign NameStore BinOpMod BinOpDiv NameLoad Num Num Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad BinOpMult NameLoad Num Assign NameStore BinOpSub BinOpMult NameLoad Num NameLoad Assign NameStore BinOpMult NameLoad BinOpSub Num NameLoad Assign NameStore BinOpMult NameLoad BinOpSub Num BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad BinOpSub Num BinOpMult NameLoad BinOpSub Num NameLoad Assign NameStore BinOpMod NameLoad Num If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A 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
 N/A __all__ N/A rgb_to_yiq yiq_to_rgb rgb_to_hls hls_to_rgb rgb_to_hsv hsv_to_rgb N/A ONE_THIRD N/A 1.0 3.0 N/A ONE_SIXTH N/A 1.0 6.0 N/A TWO_THIRD N/A 2.0 3.0 rgb_to_yiq N/A N/A r g b N/A N/A N/A y N/A N/A N/A 0.3 r N/A 0.59 g N/A 0.11 b N/A i N/A N/A N/A 0.6 r N/A 0.28 g N/A 0.32 b N/A q N/A N/A N/A 0.21 r N/A 0.52 g N/A 0.31 b N/A N/A y i q N/A yiq_to_rgb N/A N/A y i q N/A N/A N/A r N/A N/A y N/A 0.948262 i N/A 0.624013 q N/A g N/A N/A y N/A 0.276066 i N/A 0.63981 q N/A b N/A N/A y N/A 1.10545 i N/A 1.72986 q N/A N/A r 0.0 N/A N/A r 0.0 N/A N/A g 0.0 N/A N/A g 0.0 N/A N/A b 0.0 N/A N/A b 0.0 N/A N/A r 1.0 N/A N/A r 1.0 N/A N/A g 1.0 N/A N/A g 1.0 N/A N/A b 1.0 N/A N/A b 1.0 N/A N/A r g b N/A rgb_to_hls N/A N/A r g b N/A N/A N/A maxc N/A max r g b N/A minc N/A min r g b N/A l N/A N/A minc maxc 2.0 N/A N/A minc maxc N/A N/A N/A 0.0 l 0.0 N/A N/A l 0.5 N/A N/A s N/A N/A maxc minc N/A maxc minc N/A N/A s N/A N/A maxc minc N/A N/A 2.0 maxc minc N/A rc N/A N/A maxc r N/A maxc minc N/A gc N/A N/A maxc g N/A maxc minc N/A bc N/A N/A maxc b N/A maxc minc N/A N/A r maxc N/A N/A h N/A bc gc N/A N/A N/A g maxc N/A N/A h N/A N/A 2.0 rc bc N/A N/A h N/A N/A 4.0 gc rc N/A h N/A N/A h 6.0 1.0 N/A N/A h l s N/A hls_to_rgb N/A N/A h l s N/A N/A N/A N/A s 0.0 N/A N/A N/A l l l N/A N/A l 0.5 N/A N/A m2 N/A l N/A 1.0 s N/A N/A m2 N/A N/A l s N/A l s N/A m1 N/A N/A 2.0 l m2 N/A N/A N/A _v m1 m2 N/A h ONE_THIRD N/A _v m1 m2 h N/A _v m1 m2 N/A h ONE_THIRD N/A _v N/A N/A m1 m2 hue N/A N/A N/A hue N/A hue 1.0 N/A N/A hue ONE_SIXTH N/A N/A N/A m1 N/A N/A N/A m2 m1 hue 6.0 N/A N/A hue 0.5 N/A N/A m2 N/A N/A hue TWO_THIRD N/A N/A N/A m1 N/A N/A N/A m2 m1 N/A TWO_THIRD hue 6.0 N/A m1 N/A rgb_to_hsv N/A N/A r g b N/A N/A N/A maxc N/A max r g b N/A minc N/A min r g b N/A v maxc N/A N/A minc maxc N/A N/A N/A 0.0 0.0 v N/A s N/A N/A maxc minc maxc N/A rc N/A N/A maxc r N/A maxc minc N/A gc N/A N/A maxc g N/A maxc minc N/A bc N/A N/A maxc b N/A maxc minc N/A N/A r maxc N/A N/A h N/A bc gc N/A N/A N/A g maxc N/A N/A h N/A N/A 2.0 rc bc N/A N/A h N/A N/A 4.0 gc rc N/A h N/A N/A h 6.0 1.0 N/A N/A h s v N/A hsv_to_rgb N/A N/A h s v N/A N/A N/A N/A s 0.0 N/A N/A N/A v v v N/A i N/A int N/A h 6.0 N/A f N/A N/A h 6.0 i N/A p N/A v N/A 1.0 s N/A q N/A v N/A 1.0 N/A s f N/A t N/A v N/A 1.0 N/A s N/A 1.0 f N/A i N/A i 6 N/A N/A i 0 N/A N/A N/A v t p N/A N/A i 1 N/A N/A N/A q v p N/A N/A i 2 N/A N/A N/A p v t N/A N/A i 3 N/A N/A N/A p q v N/A N/A i 4 N/A N/A N/A t p v N/A N/A i 5 N/A N/A N/A v p q N/A