修饰符


修饰符的支持因不同的终端而异。 如果不支持,则它们通常会被忽略。

  • reset - 将所有(颜色)修饰符重置为其默认值
  • bold - 使文本加粗
  • italic - 使文本斜体
  • underline - 使文本下划线
  • strikethrough - 在文本中间放置一条水平线(别名:strikeThrough, crossedout, crossedOut
  • hidden - 打印文本,但使其不可见(别名:conceal)
  • dim - 颜色强度降低(别名:faint
  • overlined - 使文本上划线
  • blink - 间隔地隐藏和显示文本
  • inverse - 交换前景色和背景色(别名:swapcolorsswapColors
  • doubleunderline - 使文本双下划线(别名:doubleUnderline
  • framed - 在文本周围画一个框架

Modifier support varies throughout different terminals. They will mostly be ignored, if not supported.

  • reset - Resets all (color) modifiers to their defaults
  • bold - Make text bold
  • italic - Make text italic
  • underline - Make text underlined
  • strikethrough - Puts a horizontal line through the center of the text (Alias: strikeThrough, crossedout, crossedOut)
  • hidden - Prints the text, but makes it invisible (Alias: conceal)
  • dim - Decreased color intensity (Alias: faint)
  • overlined - Make text overlined
  • blink - Hides and shows the text in an interval
  • inverse - Swap foreground and background colors (Alias: swapcolors, swapColors)
  • doubleunderline - Make text double underlined (Alias: doubleUnderline)
  • framed - Draw a frame around the text