6 print "\033[",$fg,"m","[t${fg}t]","\033[0m";
11 print "\033[",$fg+30,"m","[t${fg}t]","\033[0m";
16 print "\033[",$bg+40,"m","[t${bg}t]","\033[0m";
22 print "\033[",$fg+30,";",$bg+40,"m","[t$fg,${bg}t]","\033[0m";
27 for my $attr (0,1,5,7,4,8,9) {
28 print "\nAttr:$attr\n";
32 print "\033[",$attr,";",$fg+30,";",$bg+40,"m","[t$fg,${bg}t]","\033[0m";
42 5 BG BRIGHT under sh
/putty
44 4 UNDERLINE under gnome
-terminal
and putty
45 8 HIDDENT
(sh
=> fg black
, gnome
-terminal
=> fg
==bg
)
46 9 Strikethrough under gnome
-terminal
48 http
://en
.wikipedia
.org
/wiki/ANSI_escape_code
65 #define MAGENTA 5 // Æ·ºì
74 void color
(int attr
, int fg
, int bg
)
76 printf("%c[%d;%d;%dm", 0x1B, attr
, fg
+30, bg
+40);