<s> """<STR_LIT>""" <EOL> def get_color ( color ) : <EOL> """<STR_LIT>""" <EOL> if not color : <EOL> return None <EOL> if isinstance ( color , int ) : <EOL> temp = color <EOL> blue = temp % <NUM_LIT> <EOL> temp = int ( temp / <NUM_LIT> ) <EOL> green = temp % <NUM_LIT> <EOL> temp = int ( temp / <NUM_LIT> ) <EOL> red = temp % <NUM_LIT> <EOL> return ( red , green , blue ) <EOL> if not len ( color ) == <NUM_LIT:3> : <EOL> raise Exception ( '<STR_LIT>' . format ( color ) ) <EOL> return color <EOL> def brighten ( color , n ) : <EOL> return ( int ( ( color [ <NUM_LIT:0> ] + n ) % <NUM_LIT> ) , int ( ( color [ <NUM_LIT:1> ] + n ) % <NUM_LIT> ) , int ( ( color [ <NUM_LIT:2> ] + n ) % <NUM_LIT> ) ) <EOL> def darken ( color , n ) : <EOL> return brighten ( color , - n ) <EOL> def get_color_between ( color1 , color2 , i ) : <EOL> """<STR_LIT>""" <EOL> if i <= <NUM_LIT:0> : <EOL> return color1 <EOL> if i >= <NUM_LIT:1> : <EOL> return color2 <EOL> return ( int ( color1 [ <NUM_LIT:0> ] + ( color2 [ <NUM_LIT:0> ] - color1 [ <NUM_LIT:0> ] ) * i ) , <EOL> int ( color1 [ <NUM_LIT:1> ] + ( color2 [ <NUM_LIT:1> ] - color1 [ <NUM_LIT:1> ] ) * i ) , <EOL> int ( color1 [ <NUM_LIT:2> ] + ( color2 [ <NUM_LIT:2> ] - color1 [ <NUM_LIT:2> ] ) * i ) ) </s>
