ちょっと調べてみた
モジュールに依存しない方法を調べたところ
print("\033[32mどうですか\033[40m")
#\はバックスラッシュ
ASCIIコードANSI color codes でだす方法をみつけた
自分用に貼っておこ...
[30m
|
--
|
set foreground color to black
|
[31m
|
--
|
set foreground color to red
|
[32m
|
--
|
set foreground color to green
|
[33m
|
--
|
set foreground color to yellow
|
[34m
|
--
|
set foreground color to blue
|
[35m
|
--
|
set foreground color to magenta (purple)
|
[36m
|
--
|
set foreground color to cyan
|
[37m
|
--
|
set foreground color to white
|
[39m
|
2.53
|
set foreground color to default (white)
|
[40m
|
--
|
set background color to black
|
[41m
|
--
|
set background color to red
|
[42m
|
--
|
set background color to green
|
[43m
|
--
|
set background color to yellow
|
[44m
|
--
|
set background color to blue
|
[45m
|
--
|
set background color to magenta (purple)
|
[46m
|
--
|
set background color to cyan
|
[47m
|
--
|
set background color to white
|
[49m
|
2.53
|
set background color to default (black)
|
0 件のコメント:
コメントを投稿