code: def _prepare_colors_for_markers(marker_color, number_of_nodes):
      """Generate "color" and "colorscale" attributes \
      based on `marker_color` mode.
  
      Parameters
      ----------
      marker_color : color or sequence of colors, default='auto'
          Color(s) of the nodes.
  
      number_of_nodes : int
          Number of nodes in the view
  
      Returns
      -------
      markers_colors: list
          List of `number_of_nodes` colors as hexadecimal values
      """
      if isinstance(marker_color, str) and marker_color == "auto":
          colors = mpl_cm.viridis(np.linspace(0, 1, number_of_nodes))
      elif isinstance(marker_color, str):
          colors = [marker_color] * number_of_nodes
      else:
          colors = marker_color
  
      return to_color_strings(colors)
  
file_path: nilearn/nilearn/plotting/html_connectome.py
imports: import json
  import numpy
  from matplotlib import cm
  from scipy import sparse
  from nilearn.plotting.html_document import HTMLDocument
  from ..None import datasets
  from .None import cm
  from .js_plotting_utils import add_js_lib, colorscale, encode, get_html_template, mesh_to_plotly, to_color_strings
label_desc: Use image node_id 3 for calling a global function with example usage: _prepare_colors_for_markers(marker_color, number_of_nodes) and returns: to_color_strings