class_docstr: Abstract class to represents a color map.
class_docstr_tok: ["Abstract","class","to","represents","a","color","map","."]
code: def __init__(
      self,
      base_colormap: List[RGBColor],
      num_colors: int,
      device: Optional[torch.device],
      dtype: Optional[torch.dtype],
  ) -> None:
      self._dtype = dtype
      self._device = device
  
      self.colors = interpolate(
          _list_color_to_tensor(
              base_colormap, dtype=self._dtype, device=self._device
          )[None, ...],
          size=num_colors,
          mode="linear",
      )[0, ...]
  
file_path: kornia/kornia/color/colormap.py
imports: from abc import ABC
  from typing import List, Optional
  import torch
  from torch.nn.functional import interpolate
  from kornia.core import Module, Tensor, tensor
  from kornia.core.check import KORNIA_CHECK_IS_GRAY
label_desc: Use image node_id 1 to create a new ColorMap object from inherited base classes: ABC with example: obj = ColorMap(base_colormap, num_colors, device, dtype)