LoginSignup
8
9

More than 5 years have passed since last update.

とりあえずpythonでtermcolorを使ってみた

Posted at

termcolorを使えば標準出力の色を変えれるみたいで、試しに使ってみた。

インストール

pip install termcolor
環境
python==3.5.2
termcolor==1.1.0

実行結果

qtermcolor.png

使えるテキストの色

  • grey
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

使える背景色

  • on_grey
  • on_red
  • on_green
  • on_yellow
  • on_blue
  • on_magenta
  • on_cyan
  • on_white

attrs

  • bold
  • dark
  • underline
  • blink
  • reverse
  • concealed
8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9