code: def rainbow(self):
          
          if not self.items:
              return {"full_text": "", "cached_until": self.py3.CACHE_FOREVER}
  
          if time() >= self._cycle_time - (self.cycle_time / 10):
              self.active_color = (self.active_color + 1) % len(self.colors)
              self._set_cycle_time()
  
          color = self.colors[self.active_color]
          content = self._get_current_output()
          output = []
  
          if content:
              step = len(self.colors) // len(content)
          for index, item in enumerate(content):
              if self.multi_color:
                  offset = (self.active_color + (index * step)) % len(self.colors)
                  color = self.colors[offset]
              obj = item.copy()
              if self.force or not obj.get("color"):
                  obj["color"] = color
              output.append(obj)
  
          composites = {"output": self.py3.composite_create(output)}
          rainbow = self.py3.safe_format(self.format, composites)
  
          return {"cached_until": self._cycle_time, "full_text": rainbow}
docs: Make a rainbow!