code: def get_ternary_colors(
      scores: np.array,
      negative_color="#d72d00",
      zero_color="#bdbdbd",
      positive_color="#2a3e63",
  ) -> np.array:
      colors = np.array([zero_color] * len(scores))
      colors[scores < 0] = negative_color
      colors[scores > 0] = positive_color
      return list(colors)
  
file_path: scattertext/demo_umap_wordcloud.py
imports: import re
  from bisect import bisect_left
  import numpy
  import pandas
  import umap
  import scattertext
  import spacy
label_desc: Use image node_id 1 for calling a global function with example usage: get_ternary_colors(scores, negative_color, zero_color, positive_color) and returns: list