parameters: (rgb)
return_statement: return colour
docstring: Convert a given rgb value to an integer
  
      :type rgb: list|tuple
      :rtype: int
docstring_summary: Convert a given rgb value to an integer
docstring_tokens: Convert a given rgb value to an integer
function: def rgb2int(rgb):
      """Convert a given rgb value to an integer
  
      :type rgb: list|tuple
      :rtype: int
  
      """
      is_tuple = isinstance(rgb, tuple)
      rgb = list(rgb) if is_tuple else rgb
  
      colour = (int(rgb[0]*255) << 16) + (int(rgb[1]*255) << 8) + int(rgb[2]*255)
      return colour
function_tokens: def rgb2int ( rgb ) : is_tuple = isinstance ( rgb , tuple ) rgb = list ( rgb ) if is_tuple else rgb colour = ( int ( rgb [ 0 ] * 255 ) << 16 ) + ( int ( rgb [ 1 ] * 255 ) << 8 ) + int ( rgb [ 2 ] * 255 ) return colour