class_docstr: Track the colors for various types, the transparency range, and bit precisions.
  By default, green indicates floating-point, blue indicates integer, and orange
  indicates complex numbers. The more saturated the color (lower transparency),
  the higher the precision.
class_docstr_tok: ["Track","the","colors","for","various","types",",","the","transparency","range",",","and","bit","precisions",".","By","default",",","green","indicates","floating-point",",","blue","indicates","integer",",","and","orange","indicates","complex","numbers",".","The","more","saturated","the","color","(","lower","transparency",")",",","the","higher","the","precision","."]
docstr: Get color based on type and precision. Return list of RGB and alpha
code: def color(self, dtype):
      """Get color based on type and precision. Return list of RGB and alpha"""
      dtype_name, dtype_precision = PyVizView._split_dtype_precision(
          dtype
      )
      if dtype_name not in self.dtype_colors:
          return self.dtype_colors["other"]
      color = self.dtype_colors[dtype_name]
      dtype_precision = int(dtype_precision)
      if dtype_precision not in self.dtype_precisions:
          return self.dtype_colors["other"]
  
      color = (
          mc.hex2color(color) if color[0] == "#" else mc.cnames[color]
      )
      precision_idx = self.dtype_precisions.index(dtype_precision)
      nshades = len(self.dtype_precisions)
      alphas = np.linspace(*self.dtype_alpha_range, nshades)
      alpha = alphas[precision_idx]
      return list(color) + [alpha]
  
imports: import sys
  import os
  from pathlib import Path
  import tempfile
  import graphviz
  import graphviz.backend
  import token
  import matplotlib.patches
  import matplotlib.pyplot
  import matplotlib.colors
  from IPython.display import display, SVG
  from IPython import get_ipython
  import numpy
  import tsensor
  import tsensor.ast
  import tsensor.analysis
  import tsensor.parsing
label_desc: Use image node_id 2 for calling the DTypeColorInfo obj's underlying member method code with example usage: obj.color(dtype) and returns: unknown, self, self