original_docstring: Extracts background colors from cell of excel sheet.
  
      Args:
          excel_file (str): filename of excel file
          sheet_name (str): sheet name in excel file
  
      Returns:
          [set]: All colors (Hex and rgb) from excel sheet
          [numpy array]: Hex colors as matrix like excel sheet
      
docstring: Extracts background colors from cell of excel sheet.
docstring_tokens: Extracts background colors from cell of excel sheet .
code: def define_colors(sheet):
      """Extracts background colors from cell of excel sheet.
  
      Args:
          excel_file (str): filename of excel file
          sheet_name (str): sheet name in excel file
  
      Returns:
          [set]: All colors (Hex and rgb) from excel sheet
          [numpy array]: Hex colors as matrix like excel sheet
      """
      colors = []
      max_row = sheet.max_row
      max_col = sheet.max_column
  
      for row in range(1, max_row +1):
          for c in range(1, max_col+1):
              cell_color = sheet.cell(row, c).fill.start_color.index
              hex_color = cell_color[2:]
              r, g, b = tuple(round(int(cell_color[i+2:i+4], 16)* 100/255)/100 for i in (0, 2, 4))
              colors.append((hex_color, r,g,b))
  
      color_matrix = np.array([el[0] for el in colors]).reshape(max_row , max_col)
  
      return set(colors), color_matrix
code_tokens: def define_colors ( sheet ) : colors = [ ] max_row = sheet . max_row max_col = sheet . max_column for row in range ( 1 , max_row + 1 ) : for c in range ( 1 , max_col + 1 ) : cell_color = sheet . cell ( row , c ) . fill . start_color . index hex_color = cell_color [ 2 : ] r , g , b = tuple ( round ( int ( cell_color [ i + 2 : i + 4 ] , 16 ) * 100 / 255 ) / 100 for i in ( 0 , 2 , 4 ) ) colors . append ( ( hex_color , r , g , b ) ) color_matrix = np . array ( [ el [ 0 ] for el in colors ] ) . reshape ( max_row , max_col ) return set ( colors ) , color_matrix
short_docstring: Extracts background colors from cell of excel sheet.
short_docstring_tokens: Extracts background colors from cell of excel sheet .
comment: """Extracts background colors from cell of excel sheet.
  
      Args:
          excel_file (str): filename of excel file
          sheet_name (str): sheet name in excel file
  
      Returns:
          [set]: All colors (Hex and rgb) from excel sheet
          [numpy array]: Hex colors as matrix like excel sheet
      """