def _Color(fg = None, bg = None, attr = None):
    fg = COLORS[fg]
    bg = COLORS[bg]
    attr = ATTRS[attr]

    if attr >= 0 or fg >= 0 or bg >= 0:
      need_sep = False
      code = "\033["

      if attr >= 0:
        code += chr(ord('0') + attr)
        need_sep = True

      if fg >= 0:
        if need_sep:
          code += ';'
        need_sep = True

        if fg < 8:
          code += '3%c' % (ord('0') + fg)
        else:
          code += '38;5;%d' % fg

      if bg >= 0:
        if need_sep:
          code += ';'
        need_sep = True

        if bg < 8:
          code += '4%c' % (ord('0') + bg)
        else:
          code += bg % '48;5;%d'
      code += 'm'
    else:
      code = ''
    return code
dataset/ETHPy150Open android/tools_repo/color.py/_Color/swapped operands of `%`