code: def fgseq(code):
      
      if isinstance(code, str):
          code = nametonum(code)
      
      if code == -1:
          return ""
      
      s = termcap.get('setaf', code) or termcap.get('setf', code)
      return s
docs: Returns the forground color terminal escape sequence for the given color code number or color name.