def rgba(s, *args):
 if isinstance(s, string_types):
  return get_color_from_hex(s)
 elif isinstance(s, (list, tuple)):
  s = map((lambda x: (x / 255.0)), s)
  if (len(s) == 3):
   return (list(s) + [1])
  return s
 elif isinstance(s, (int, float)):
  s = map((lambda x: (x / 255.0)), ([s] + list(args)))
  if (len(s) == 3):
   return (list(s) + [1])
  return s
 raise Exception('Invalid value (not a string / list / tuple)')

def rgba ( s , * args ) : if isinstance ( s , string_types ) : return get_color_from_hex ( s ) elif isinstance ( s , ( list , tuple ) ) : s = map ( ( lambda x : ( x / 255.0 ) ) , s ) if ( len ( s ) == 3 ) : return ( list ( s ) + [ 1 ] ) return s elif isinstance ( s , ( int , float ) ) : s = map ( ( lambda x : ( x / 255.0 ) ) , ( [ s ] + list ( args ) ) ) if ( len ( s ) == 3 ) : return ( list ( s ) + [ 1 ] ) return s raise Exception ( 'Invalid value (not a string / list / tuple)' )
return a kivy color from either a hex string or a list of 0-255 values .