code: def mask(self, dims=None, base=None, fill='deeppink', stroke='black', background=None):
          
          fill = getcolor(fill)
          stroke = getcolor(stroke)
          background = getcolor(background)
  
          if dims is None and base is None:
              region = one(self.coordinates - self.bbox[0:2])
          else:
              region = self
  
          base = getbase(base=base, dims=dims, extent=self.extent, background=background)
  
          if fill is not None:
              for channel in range(3):
                  inds = asarray([[c[0], c[1], channel] for c in region.coordinates])
                  base[inds.T.tolist()] = fill[channel]
  
          if stroke is not None:
              mn = [0, 0]
              mx = [base.shape[0], base.shape[1]]
              edge = region.outline(0, 1).coordinates
              edge = [e for e in edge if all(e >= mn) and all(e < mx)]
              if len(edge) > 0:
                  for channel in range(3):
                      inds = asarray([[c[0], c[1], channel] for c in edge])
                      base[inds.T.tolist()] = stroke[channel]
  
          return base
docs: Create a mask image with colored regions.
  
          Parameters
          ----------
          dims : tuple, optional, default = None
              Dimensions of embedding image,
              will be ignored if background image is provided.
  
          base : array-like, optional, default = None
              Base image, can provide a 2d or 3d array, 
              if unspecified will be white.
  
          fill : str or array-like, optional, default = 'pink'
              String color specifier, or RGB value
  
          stroke : str or array-like, optional, default = None
              String color specifier, or RGB value
  
          background : str or array-like, optional, default = None
              String color specifier, or RGB value